Re: [PATCH -tip] x86/mm: Use %RIP-relative address in untagged_addr()

From: kirill . shutemov
Date: Fri Nov 17 2023 - 05:45:12 EST


On Fri, Nov 17, 2023 at 10:41:03AM +0100, Peter Zijlstra wrote:
> On Thu, Nov 16, 2023 at 08:10:59PM +0100, Uros Bizjak wrote:
> > %RIP-relative addresses are nowadays correctly handled in alternative
> > instructions, so remove misleading comment and improve assembly to
> > use %RIP-relative address.
>
> Ha!, it might've been this exact case (and Kirill grumbling) that got me
> to fix the alternative code :-)

Nice! :)

> > Also, explicitly using %gs: prefix will segfault for non-SMP builds.
> > Use macros from percpu.h which will DTRT with segment prefix register
> > as far as SMP/non-SMP builds are concerned.
>
> > Signed-off-by: Uros Bizjak <ubizjak@xxxxxxxxx>
>
> Acked-byL Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>

--
Kiryl Shutsemau / Kirill A. Shutemov