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: <20250224163513.1ea561b7@gandalf.local.home>
Date: Mon, 24 Feb 2025 16:35:13 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Mark Brown <broonie@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 linux-kbuild@...r.kernel.org, bpf <bpf@...r.kernel.org>,
 linux-arm-kernel@...ts.infradead.org, linux-s390@...r.kernel.org, Masami
 Hiramatsu <mhiramat@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Peter Zijlstra <peterz@...radead.org>, Linus
 Torvalds <torvalds@...ux-foundation.org>, 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>, Heiko
 Carstens <hca@...ux.ibm.com>, Catalin Marinas <catalin.marinas@....com>,
 Will Deacon <will@...nel.org>, Vasily Gorbik <gor@...ux.ibm.com>, Alexander
 Gordeev <agordeev@...ux.ibm.com>
Subject: Re: [PATCH v5 4/6] scripts/sorttable: Zero out weak functions in
 mcount_loc table

On Mon, 24 Feb 2025 20:06:28 +0000
Mark Brown <broonie@...nel.org> wrote:

> On Tue, Feb 18, 2025 at 02:59:22PM -0500, Steven Rostedt wrote:
> > From: Steven Rostedt <rostedt@...dmis.org>
> > 
> > When a function is annotated as "weak" and is overridden, the code is not
> > removed. If it is traced, the fentry/mcount location in the weak function
> > will be referenced by the "__mcount_loc" section. This will then be added
> > to the available_filter_functions list. Since only the address of the
> > functions are listed, to find the name to show, a search of kallsyms is
> > used.  
> 
> This breaks builds with ftrace on architectures without KASLR, one
> affected configuration is bcm2835_defconfig:
> 
> /home/broonie/git/bisect/kernel/trace/ftrace.c: In function 'ftrace_process_locs':
> /home/broonie/git/bisect/kernel/trace/ftrace.c:7057:24: error: implicit declaration of function 'kaslr_offset' [-Werror=implicit-function-declaration]
>  7057 |         kaslr = !mod ? kaslr_offset() : 0;
>       |                        ^~~~~~~~~~~~
> 
> since that happens to enable CONFIG_FUNCTION_TRACER but doesn't have
> KASLR, we don't have stubs for KASLR on architectures that don't have
> it.  It also looks like from a quick glance at least RISC-V will fail to
> link since it only provides kaslr_offset() with RANDOMIZE_BASE enabled.
> This all feels a bit footgunish.

Already reported:

  https://lore.kernel.org/all/20250224180805.GA1536711@ax162/

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ