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] [day] [month] [year] [list]
Message-ID: <20251226133038.593d7914@gandalf.local.home>
Date: Fri, 26 Dec 2025 13:30:38 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Julia Lawall <Julia.Lawall@...ia.fr>
Cc: "Paul E . McKenney" <paulmck@...nel.org>, Gabriele Paoloni
 <gpaoloni@...hat.com>, keisuke.nishimura@...ia.fr, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
 linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] tracing: drop unneeded assignment to soft_mode

On Fri, 26 Dec 2025 12:05:31 +0100
Julia Lawall <Julia.Lawall@...ia.fr> wrote:

> soft_mode is not read in the enable case, so drop the assignment.
> Drop also the comment text that refers to the assignment and realign
> the comment.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@...ia.fr>
> 
> ---
> 
> Since soft_more is not used, there is no direct line from the goal of
> verification to finding this problem.

While reviewing the verification text awhile ago, I had made this same
patch. But it never got queued :-p

Anyway, since you officially posted your patch, I'll take it instead ;-)

-- Steve


> 
> kernel/trace/trace_events.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c
> index 76067529db61..137b4d9bb116 100644
> --- a/kernel/trace/trace_events.c
> +++ b/kernel/trace/trace_events.c
> @@ -826,16 +826,15 @@ static int __ftrace_event_enable_disable(struct trace_event_file *file,
>  		 * When soft_disable is set and enable is set, we want to
>  		 * register the tracepoint for the event, but leave the event
>  		 * as is. That means, if the event was already enabled, we do
> -		 * nothing (but set soft_mode). If the event is disabled, we
> -		 * set SOFT_DISABLED before enabling the event tracepoint, so
> -		 * it still seems to be disabled.
> +		 * nothing. If the event is disabled, we set SOFT_DISABLED
> +		 * before enabling the event tracepoint, so it still seems
> +		 * to be disabled.
>  		 */
>  		if (!soft_disable)
>  			clear_bit(EVENT_FILE_FL_SOFT_DISABLED_BIT, &file->flags);
>  		else {
>  			if (atomic_inc_return(&file->sm_ref) > 1)
>  				break;
> -			soft_mode = true;
>  			/* Enable use of trace_buffered_event */
>  			trace_buffered_event_enable();
>  		}


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ