[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250811072013.GNaJmZrWDWsZQY_Eig@fat_crate.local>
Date: Mon, 11 Aug 2025 09:20:13 +0200
From: Borislav Petkov <bp@...en8.de>
To: Ard Biesheuvel <ardb+git@...gle.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>
Cc: linux-kernel@...r.kernel.org, linux-efi@...r.kernel.org, x86@...nel.org,
Ard Biesheuvel <ardb@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Kevin Loughlin <kevinloughlin@...gle.com>,
Tom Lendacky <thomas.lendacky@....com>,
Nikunj A Dadhania <nikunj@....com>
Subject: Re: [PATCH v6 15/22] objtool: Add action to check for absence of
absolute relocations
On Tue, Jul 22, 2025 at 09:27:24AM +0200, Ard Biesheuvel wrote:
> From: Ard Biesheuvel <ardb@...nel.org>
>
> The x86 startup code must not use absolute references to code or data,
> as it executes before the kernel virtual mapping is up.
>
> Add an action to objtool to check all allocatable sections (with the
> exception of __patchable_function_entries, which uses absolute
> references for nebulous reasons) and raise an error if any absolute
> references are found.
>
> Note that debug sections typically contain lots of absolute references
> too, but those are not allocatable so they will be ignored.
>
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
> tools/objtool/arch/x86/decode.c | 12 ++++++
> tools/objtool/builtin-check.c | 2 +
> tools/objtool/check.c | 44 ++++++++++++++++++++
> tools/objtool/include/objtool/arch.h | 1 +
> tools/objtool/include/objtool/builtin.h | 1 +
> 5 files changed, 60 insertions(+)
Looks ok to me.
Peter, Josh?
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists