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: <CAOc5a3O-8wrQq3oNJC+H9ncFt0yxcm4O+QSgPk4QckF6Ak5pGg@mail.gmail.com>
Date: Tue, 4 Feb 2025 12:44:25 +0100
From: Lukas Bulwahn <lbulwahn@...hat.com>
To: Will Deacon <will@...nel.org>
Cc: Masami Hiramatsu <mhiramat@...nel.org>, Steven Rostedt <rostedt@...dmis.org>, 
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, linux-trace-kernel@...r.kernel.org, 
	Catalin Marinas <catalin.marinas@....com>, Heiko Carstens <hca@...ux.ibm.com>, 
	linux-arm-kernel@...ts.infradead.org, kernel-janitors@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Lukas Bulwahn <lukas.bulwahn@...hat.com>
Subject: Re: [PATCH] arm64: Kconfig: Remove selecting replaced HAVE_FUNCTION_GRAPH_RETVAL

On Tue, Feb 4, 2025 at 12:36 PM Will Deacon <will@...nel.org> wrote:
>
> On Fri, Jan 17, 2025 at 07:55:22AM -0500, Lukas Bulwahn wrote:
> > From: Lukas Bulwahn <lukas.bulwahn@...hat.com>
> >
> > Commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > replaces the config HAVE_FUNCTION_GRAPH_RETVAL with the config
> > HAVE_FUNCTION_GRAPH_FREGS, and it replaces all the select commands in the
> > various architecture Kconfig files. In the arm64 architecture, the commit
> > adds the 'select HAVE_FUNCTION_GRAPH_FREGS', but misses to remove the
> > 'select HAVE_FUNCTION_GRAPH_RETVAL', i.e., the select on the replaced
> > config.
> >
> > Remove selecting the replaced config. No functional change, just cleanup.
> >
> > Fixes: a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs")
> > Signed-off-by: Lukas Bulwahn <lukas.bulwahn@...hat.com>
> > ---
> >  arch/arm64/Kconfig | 1 -
> >  1 file changed, 1 deletion(-)
>
> Hmm. There are still a couple of CONFIG_HAVE_FUNCTION_GRAPH_RETVAL guards
> kicking around:
>
> include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
> kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
>
> so it's not clear we can just remove the option from arm64 without
> breaking ftrace_return_to_handler(). What am I missing?
>

Will,

I believe you are looking at a tree, which did not include commit
a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with ftrace_regs") yet.

A quick look:

$ git checkout  a3ed4157b7d8~1
HEAD is now at 41705c4262aa fgraph: Pass ftrace_regs to entryfunc
$ grep "CONFIG_HAVE_FUNCTION_GRAPH_RETVAL" . -R
./include/linux/ftrace.h:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL
./kernel/trace/fgraph.c:#ifdef CONFIG_HAVE_FUNCTION_GRAPH_RETVAL

$ git checkout  a3ed4157b7d8
Previous HEAD position was 41705c4262aa fgraph: Pass ftrace_regs to entryfunc
HEAD is now at a3ed4157b7d8 fgraph: Replace fgraph_ret_regs with ftrace_regs
$ grep "CONFIG_HAVE_FUNCTION_GRAPH_RETVAL" . -R
$

Once commit a3ed4157b7d8 ("fgraph: Replace fgraph_ret_regs with
ftrace_regs") is applied, grepping for
CONFIG_HAVE_FUNCTION_GRAPH_RETVAL should not have any further use of
that config.

I was looking at linux-next at the time of writing that patch.

Lukas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ