lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250716113243.GU1613200@noisy.programming.kicks-ass.net>
Date: Wed, 16 Jul 2025 13:32:43 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Ard Biesheuvel <ardb@...nel.org>
Cc: Ard Biesheuvel <ardb+git@...gle.com>, linux-kernel@...r.kernel.org,
	linux-efi@...r.kernel.org, x86@...nel.org,
	Borislav Petkov <bp@...en8.de>, Ingo Molnar <mingo@...nel.org>,
	Kevin Loughlin <kevinloughlin@...gle.com>,
	Tom Lendacky <thomas.lendacky@....com>,
	Josh Poimboeuf <jpoimboe@...nel.org>,
	Nikunj A Dadhania <nikunj@....com>
Subject: Re: [PATCH v5 15/22] objtool: Add action to check for absence of
 absolute relocations

On Wed, Jul 16, 2025 at 08:26:55PM +1000, Ard Biesheuvel wrote:

> For robustness, we should actually check for all absolute relocations
> here, including R_X86_64_32S, which is not abstracted into a R_ABSxx
> type for objtool.
> 
> So perhaps this needs an arch hook where x86_64 can implement it as
> 
> bool arch_is_abs_reloc(reloc)
> {
>    switch (reloc_type(reloc)) {
>    case R_X86_64_32:
>    case R_X86_64_32S:
>    case R_X86_64_64:
>       return true;
>    }
>    return false;
> }
> 
> and the default just compares against R_ABS32 / R_ABS64 depending on
> the word size?

Yes, an arch hook like that makes sense. Perhaps make the signature:

bool arch_is_abs_reloc(struct elf *, struct reloc *);

Because the word size comes from elf_addr_size().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ