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: <20260105112128.3685d2a94ea154107fe26887@kernel.org>
Date: Mon, 5 Jan 2026 11:21:28 +0900
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
 <linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 Dan Carpenter <dan.carpenter@...aro.org>, pengdonglin
 <pengdonglin@...omi.com>
Subject: Re: [PATCH] ftrace: Make ftrace_graph_ent depth field signed

On Fri, 2 Jan 2026 14:31:48 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:

> From: Steven Rostedt <rostedt@...dmis.org>
> 
> The code has integrity checks to make sure that depth never goes below
> zero. But the depth field has recently been converted to unsigned long
> from "int" (for alignment reasons). As unsigned long can never be less
> than zero, the integrity checks no longer work.
> 
> Convert depth to long from unsigned long to allow the integrity checks to
> work again.
> 
> Cc: stable@...r.kernel.org
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/all/aS6kGi0maWBl-MjZ@stanley.mountain/
> Fixes: f83ac7544fbf7 ("function_graph: Enable funcgraph-args and funcgraph-retaddr to work simultaneously")
> Signed-off-by: Steven Rostedt (Google) <rostedt@...dmis.org>

Looks good to me.

Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>

Thanks,

> ---
>  include/linux/ftrace.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index 770f0dc993cc..a3a8989e3268 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -1167,7 +1167,7 @@ static inline void ftrace_init(void) { }
>   */
>  struct ftrace_graph_ent {
>  	unsigned long func; /* Current function */
> -	unsigned long depth;
> +	long depth; /* signed to check for less than zero */
>  } __packed;
>  
>  /*
> -- 
> 2.51.0
> 


-- 
Masami Hiramatsu (Google) <mhiramat@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ