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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250103110045.GA22934@noisy.programming.kicks-ass.net>
Date: Fri, 3 Jan 2025 12:00:45 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Steven Rostedt <rostedt@...dmis.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Linux Trace Kernel <linux-trace-kernel@...r.kernel.org>,
	bpf <bpf@...r.kernel.org>, linux-kbuild@...r.kernel.org,
	Masami Hiramatsu <mhiramat@...nel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Masahiro Yamada <masahiroy@...nel.org>,
	Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas@...sle.eu>,
	Zheng Yejian <zhengyejian1@...wei.com>,
	Martin Kelly <martin.kelly@...wdstrike.com>,
	Christophe Leroy <christophe.leroy@...roup.eu>,
	Josh Poimboeuf <jpoimboe@...hat.com>,
	Mark Rutland <mark.rutland@....com>
Subject: Re: [POC][RFC][PATCH] build: Make weak functions visible in kallsyms

On Thu, Dec 26, 2024 at 07:35:18PM -0800, Linus Torvalds wrote:

> Btw, does this actually happen when the compiler does the mcount thing for us?

Yeah, so the linker literally just drops the symbol name on the floor,
nothing else. So all the section information -- either compiler
generated like mcount locations, or manually inserted like alternatives
-- stick around for the 'dead' code.

The only time the toolchain has enough visibility to do the right thing
is when doing a full LTO build, at that point can the compiler see the
weak function is actually unused and do 'normal' DCE, including all the
resulting extra section stuff.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ