[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMj1kXFY=Os10Ov6Wv6XNxqLqbEAWTOjkdaohxL3SvveCLWnLA@mail.gmail.com>
Date: Thu, 8 Jan 2026 13:10:05 +0100
From: Ard Biesheuvel <ardb@...nel.org>
To: David Laight <david.laight.linux@...il.com>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, "H. Peter Anvin" <hpa@...or.com>,
Josh Poimboeuf <jpoimboe@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Kees Cook <kees@...nel.org>,
Uros Bizjak <ubizjak@...il.com>, Brian Gerst <brgerst@...il.com>, linux-hardening@...r.kernel.org
Subject: Re: [RFC/RFT PATCH 11/19] x86/rethook: Use RIP-relative reference for
fake return address
On Thu, 8 Jan 2026 at 13:08, David Laight <david.laight.linux@...il.com> wrote:
>
> On Thu, 8 Jan 2026 09:25:38 +0000
> Ard Biesheuvel <ardb@...nel.org> wrote:
>
> > Pushing an immediate absolute address to the stack is not permitted when
> > linking x86_64 code in PIE mode. Usually, the address can be taken using
> > a RIP-relative LEA instruction, but this is not possible here as there
> > are no available registers.
> >
> > So instead, take the address into a static global, and push it onto the
> > stack using a RIP-relative memory operand.
>
> The comment implies the address is 'fake'.
> Does that mean it could just be a constant?
It could be, but it isn't, across all architectures.
> Clearly the unwinder would need the same change.
>
Why? The value being pushed is the same.
Powered by blists - more mailing lists