* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
[not found] ` <DB2B5B4C-200F-4C0C-B14F-F58E0CF4078F@alien8.de>
@ 2026-05-21 16:47 ` Borislav Petkov
2026-05-22 5:14 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2026-05-21 16:47 UTC (permalink / raw)
To: Uros Bizjak, Jan Ingvoldstad; +Cc: stable
On May 21, 2026 4:46:11 PM UTC, Borislav Petkov <bp@alien8.de> wrote:
>+ stable
Now for real!
>
>
>On May 21, 2026 10:07:45 AM UTC, Uros Bizjak <ubizjak@gmail.com> wrote:
>>Please see [1]. Patch 2/2 was not backportable, but was backported
>>after it was merged with 1/2 nevertheless.
>>
>>[1] https://lore.kernel.org/lkml/CAFULd4aZYEi02cKeS1RAL66Qs149nLys8SJfTvfHuPH3FMXJeA@mail.gmail.com/
>>
>>Uros.
>>
>>On Thu, May 21, 2026 at 10:06 AM Jan Ingvoldstad <frettled@gmail.com> wrote:
>>>
>>> Hello,
>>>
>>> In the following commit, a bug was introduced for older systems without older binutils versions:
>>>
>>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/x86/include/asm/segment.h?id=ac9c408ed19d535289ca59200dd6a44a6a2d6036
>>>
>>> The commit states:
>>>
>>> «Use RDPID insn mnemonic while at it as the minimum binutils version of 2.30 supports it.»
>>>
>>> This statement is incorrect, and results in a build error on older systems:
>>>
>>> ./arch/x86/include/asm/segment.h:272: Error: no such instruction: `rdpid %rax'
>>>
>>> For Linux 5.15, the required minimum binutils version is 2.23, not 2.30 (https://www.kernel.org/doc/html/v5.15/process/changes.html); the requirement for 2.30 exists from 6.18 and up, so this bug likely affects all longterm releases before 6.18.
>>>
>>> While reversing the patch does result in a successful build, I am concerned that doing so introduces other bugs. Based on the commit description, it seems that the change *could* have been limited to changing "p" from int to long, and using the %k operand prefix?
>>>
>>> Could you please have a look at how your patch may be modified to be compatible with systems using the actual minimal binutils versions for 5.10, 5.15, 6.1, 6.6, and 6.12?
>>> --
>>> Kind regards,
>>> Jan
>
>So why was the patch backported in the first place??
>
>
--
Small device. Typos and formatting crap
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
2026-05-21 16:47 ` Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036 Borislav Petkov
@ 2026-05-22 5:14 ` Greg KH
2026-05-24 2:03 ` Borislav Petkov
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2026-05-22 5:14 UTC (permalink / raw)
To: Borislav Petkov; +Cc: Uros Bizjak, Jan Ingvoldstad, stable
On Thu, May 21, 2026 at 04:47:43PM +0000, Borislav Petkov wrote:
> On May 21, 2026 4:46:11 PM UTC, Borislav Petkov <bp@alien8.de> wrote:
> >+ stable
>
> Now for real!
Ok, so what are we to do about this?
>
> >
> >
> >On May 21, 2026 10:07:45 AM UTC, Uros Bizjak <ubizjak@gmail.com> wrote:
> >>Please see [1]. Patch 2/2 was not backportable, but was backported
> >>after it was merged with 1/2 nevertheless.
> >>
> >>[1] https://lore.kernel.org/lkml/CAFULd4aZYEi02cKeS1RAL66Qs149nLys8SJfTvfHuPH3FMXJeA@mail.gmail.com/
> >>
> >>Uros.
> >>
> >>On Thu, May 21, 2026 at 10:06 AM Jan Ingvoldstad <frettled@gmail.com> wrote:
> >>>
> >>> Hello,
> >>>
> >>> In the following commit, a bug was introduced for older systems without older binutils versions:
> >>>
> >>> https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/x86/include/asm/segment.h?id=ac9c408ed19d535289ca59200dd6a44a6a2d6036
> >>>
> >>> The commit states:
> >>>
> >>> «Use RDPID insn mnemonic while at it as the minimum binutils version of 2.30 supports it.»
> >>>
> >>> This statement is incorrect, and results in a build error on older systems:
> >>>
> >>> ./arch/x86/include/asm/segment.h:272: Error: no such instruction: `rdpid %rax'
> >>>
> >>> For Linux 5.15, the required minimum binutils version is 2.23, not 2.30 (https://www.kernel.org/doc/html/v5.15/process/changes.html); the requirement for 2.30 exists from 6.18 and up, so this bug likely affects all longterm releases before 6.18.
> >>>
> >>> While reversing the patch does result in a successful build, I am concerned that doing so introduces other bugs. Based on the commit description, it seems that the change *could* have been limited to changing "p" from int to long, and using the %k operand prefix?
> >>>
> >>> Could you please have a look at how your patch may be modified to be compatible with systems using the actual minimal binutils versions for 5.10, 5.15, 6.1, 6.6, and 6.12?
> >>> --
> >>> Kind regards,
> >>> Jan
> >
> >So why was the patch backported in the first place??
Are we to revert something? Apply something?
lost,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
2026-05-22 5:14 ` Greg KH
@ 2026-05-24 2:03 ` Borislav Petkov
2026-05-24 15:24 ` Sasha Levin
0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2026-05-24 2:03 UTC (permalink / raw)
To: Greg KH; +Cc: Uros Bizjak, Jan Ingvoldstad, stable
On Fri, May 22, 2026 at 07:14:10AM +0200, Greg KH wrote:
> On Thu, May 21, 2026 at 04:47:43PM +0000, Borislav Petkov wrote:
> > On May 21, 2026 4:46:11 PM UTC, Borislav Petkov <bp@alien8.de> wrote:
> > >+ stable
> >
> > Now for real!
>
> Ok, so what are we to do about this?
Right, it looks like Sasha's AI picked it up, judging by his SOB below.
Now, we don't really need to backport it to stable and I didn't CC:stable
because of that...
But yeah, it needs to be reverted because the binutils version for 5.15
doesn't support the RDPID insn mnemonic and that patch is not fixing any bug
anyway, AFAICT.
Thx.
commit 64f14b1ab6f39a704b62bf9b3fa28803cf2b3ebe
Author: Uros Bizjak <ubizjak@gmail.com>
Date: Mon Jun 16 11:52:57 2025 +0200
x86/vdso: Fix output operand size of RDPID
[ Upstream commit ac9c408ed19d535289ca59200dd6a44a6a2d6036 ]
RDPID instruction outputs to a word-sized register (64-bit on x86_64 and
32-bit on x86_32). Use an unsigned long variable to store the correct size.
LSL outputs to 32-bit register, use %k operand prefix to always print the
32-bit name of the register.
Use RDPID insn mnemonic while at it as the minimum binutils version of
2.30 supports it.
[ bp: Merge two patches touching the same function into a single one. ]
Fixes: ffebbaedc861 ("x86/vdso: Introduce helper functions for CPU and node number")
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250616095315.230620-1-ubizjak@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
2026-05-24 2:03 ` Borislav Petkov
@ 2026-05-24 15:24 ` Sasha Levin
2026-05-24 19:37 ` Borislav Petkov
0 siblings, 1 reply; 6+ messages in thread
From: Sasha Levin @ 2026-05-24 15:24 UTC (permalink / raw)
To: Greg KH; +Cc: Sasha Levin, Uros Bizjak, Jan Ingvoldstad, stable,
Borislav Petkov
> So please revert it from 5.15 - we don't really need to backport it to
> stable.
Reverted from 5.15 and 5.10 (the two trees where the older binutils
RDPID-mnemonic concern applies). Leaving the patch in 6.1/6.6/6.12 for now
since you only flagged a build break on 5.15; let me know if you'd like it
pulled from the newer trees as well.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
2026-05-24 15:24 ` Sasha Levin
@ 2026-05-24 19:37 ` Borislav Petkov
2026-05-26 11:35 ` Sasha Levin
0 siblings, 1 reply; 6+ messages in thread
From: Borislav Petkov @ 2026-05-24 19:37 UTC (permalink / raw)
To: Sasha Levin; +Cc: Greg KH, Uros Bizjak, Jan Ingvoldstad, stable
On Sun, May 24, 2026 at 11:24:15AM -0400, Sasha Levin wrote:
> > So please revert it from 5.15 - we don't really need to backport it to
> > stable.
>
> Reverted from 5.15 and 5.10 (the two trees where the older binutils
> RDPID-mnemonic concern applies). Leaving the patch in 6.1/6.6/6.12 for now
> since you only flagged a build break on 5.15; let me know if you'd like it
> pulled from the newer trees as well.
Well, it is not really stable material at all as it doesn't fix anything
out of the stable rules doc. I probably should've killed the stable tag when
applying...
Also,
118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30")
which raised the minimum binutils to 2.30 which supports the RDPID mnemonic,
came into 6.15ish so I guess the 6.x ones should be affected too. I don't have
the toolchain to test tho. If you do, you could run it with an older < 2.30
binutils to confirm.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036
2026-05-24 19:37 ` Borislav Petkov
@ 2026-05-26 11:35 ` Sasha Levin
0 siblings, 0 replies; 6+ messages in thread
From: Sasha Levin @ 2026-05-26 11:35 UTC (permalink / raw)
To: Borislav Petkov
Cc: Sasha Levin, Greg KH, Uros Bizjak, Jan Ingvoldstad, stable
> > Should I pull it from 6.1/6.6/6.12 as well, or only the older trees?
>
> Well, that patch is not really stable material at all - it is just
> a cleanup. And 118c40b7b503 ("kbuild: require gcc-8 and binutils-2.30")
> got added only around 6.15ish so the 6.x ones should be affected too.
Reverted from 6.12/6.6/6.1, thanks.
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-05-26 11:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAEffzkxUELNHBzABxVmekE2C_MFuPyfbsvO33MXZy46pNRU7xQ@mail.gmail.com>
[not found] ` <CAFULd4Z5vE7v37+4J5MLCttnG=cF0XX+Y_T0p1yeY36dL6i5Kw@mail.gmail.com>
[not found] ` <DB2B5B4C-200F-4C0C-B14F-F58E0CF4078F@alien8.de>
2026-05-21 16:47 ` Linux 5.15 bug in vdso_read_cpunode() in segment.h introduced in 2025, commit ac9c408ed19d535289ca59200dd6a44a6a2d6036 Borislav Petkov
2026-05-22 5:14 ` Greg KH
2026-05-24 2:03 ` Borislav Petkov
2026-05-24 15:24 ` Sasha Levin
2026-05-24 19:37 ` Borislav Petkov
2026-05-26 11:35 ` Sasha Levin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox