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: <20250627091310.GT1613200@noisy.programming.kicks-ass.net>
Date: Fri, 27 Jun 2025 11:13:10 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Josh Poimboeuf <jpoimboe@...nel.org>
Cc: x86@...nel.org, linux-kernel@...r.kernel.org,
	Petr Mladek <pmladek@...e.com>, Miroslav Benes <mbenes@...e.cz>,
	Joe Lawrence <joe.lawrence@...hat.com>,
	live-patching@...r.kernel.org, Song Liu <song@...nel.org>,
	laokz <laokz@...mail.com>, Jiri Kosina <jikos@...nel.org>,
	Marcos Paulo de Souza <mpdesouza@...e.com>,
	Weinan Liu <wnliu@...gle.com>,
	Fazla Mehrab <a.mehrab@...edance.com>,
	Chen Zhongjin <chenzhongjin@...wei.com>,
	Puranjay Mohan <puranjay@...nel.org>,
	Dylan Hatch <dylanbhatch@...gle.com>
Subject: Re: [PATCH v3 17/64] objtool: Fix weak symbol detection

On Thu, Jun 26, 2025 at 04:55:04PM -0700, Josh Poimboeuf wrote:
> find_symbol_hole_containing() fails to find a symbol hole (aka stripped
> weak symbol) if its section has no symbols before the hole.  This breaks
> weak symbol detection if -ffunction-sections is enabled.
> 
> Fix that by allowing the interval tree to contain section symbols, which
> are always at offset zero for a given section.
> 
> Fixes a bunch of (-ffunction-sections) warnings like:
> 
>   vmlinux.o: warning: objtool: .text.__x64_sys_io_setup+0x10: unreachable instruction
> 
> Fixes: 4adb23686795 ("objtool: Ignore extra-symbol code")
> Signed-off-by: Josh Poimboeuf <jpoimboe@...nel.org>
> ---
>  tools/include/linux/interval_tree_generic.h | 2 +-
>  tools/objtool/elf.c                         | 8 ++++----
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tools/include/linux/interval_tree_generic.h b/tools/include/linux/interval_tree_generic.h
> index aaa8a0767aa3..c0ec9dbdfbaf 100644
> --- a/tools/include/linux/interval_tree_generic.h
> +++ b/tools/include/linux/interval_tree_generic.h
> @@ -77,7 +77,7 @@ ITSTATIC void ITPREFIX ## _remove(ITSTRUCT *node,			      \
>   *   Cond2: start <= ITLAST(node)					      \
>   */									      \
>  									      \
> -static ITSTRUCT *							      \
> +ITSTATIC ITSTRUCT *							      \
>  ITPREFIX ## _subtree_search(ITSTRUCT *node, ITTYPE start, ITTYPE last)	      \
>  {									      \
>  	while (true) {							      \

IIRC this file is a direct copy from the kernel; this should probably be
changed in both?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ