[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4dxg5dunoft5r5hd5kddqzap2stn2ytiwvgik7vvktifbhiyv4@2dxkkjlygnia>
Date: Wed, 23 Apr 2025 09:41:39 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: tip-bot2 for Ard Biesheuvel <tip-bot2@...utronix.de>,
linux-tip-commits@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>, linux-efi@...r.kernel.org, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: Re: [tip: x86/boot] x86/boot: Disable jump tables in PIC code
On Wed, Apr 23, 2025 at 05:01:42PM +0200, Ard Biesheuvel wrote:
> > > So let's not bother and disable jump tables for code built with -fPIC
> > > under arch/x86/boot/startup.
> >
> > Hm, does objtool even run on boot code?
> >
>
> This is about startup code, not boot code. This is code that is part
> of vmlinux, but runs from a different mapping of memory than the one
> the linker assumes, and so it needs to be built with -fPIC to
> discourage the compiler and linker from inserting symbol references
> via the kernel virtual mapping, which may not be up yet when this code
> runs.
Maybe objtool should ignore .head.text. It doesn't need ORC, static
calls, uaccess validation, retpolines, etc.
--
Josh
Powered by blists - more mailing lists