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: <20250102142406.00a55f7c@gandalf.local.home>
Date: Thu, 2 Jan 2025 14:24:06 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
 linux-kbuild@...r.kernel.org, bpf <bpf@...r.kernel.org>
Cc: 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>
Subject: Re: [PATCH 00/14] scripts/sorttable: ftrace: Remove place holders
 for weak functions in available_filter_functions

On Thu, 02 Jan 2025 13:58:45 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:

> The last patch adds the option "-s <file>" to sorttable.c. Now this code
> is called by:
> 
>   ${NM} -S vmlinux > .tmp_vmlinux.nm-sort
>   ${objtree}/scripts/sorttable -s .tmp_vmlinux.nm-sort ${1}
> 
> Where the file created by "nm -S" is read, recording the address
> and the associated sizes of each function. It then is sorted, and
> before sorting the mcount_loc table, it is scanned to make sure
> all symbols in the mcounc_loc are within the boundaries of the functions
> defined by nm. If they are not, they are zeroed out, as they are most
> likely weak functions (I don't know what else they would be).
> 
> Then on boot up, when creating the ftrace tables from the mcount_loc
> table, it will ignore any function that matches the kaslr_offset()
> value. As KASLR will still shift the values even if they are zero.
> But by skipping over entries in mcount_loc that match kaslr_offset()
> all weak functions are removed from the ftrace table as well as the
> available_filter_functions file that is derived from it.
> 

I mentioned this in the last patch, but forgot to mention it here.

Even if kallsyms is "fixed" where it doesn't return the name of a function
if the address is outside its size, that doesn't fix the place holder issue
with available_filter_functions. That would just make it easier to know a
function doesn't have a name, but a place holder is still required.

This patch set removes those place holders regardless of kallsyms being
fixed or not.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ