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]
Date:   Wed, 3 Aug 2022 09:50:17 +0200
From:   Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To:     Anand Je Saipureddy <s.anandje1@...il.com>,
        "Luis Claudio R. Goncalves" <lgoncalv@...hat.com>,
        Clark Williams <williams@...hat.com>
Cc:     linux-rt-users@...r.kernel.org, linux-kernel@...r.kernel.org,
        cminyard@...sta.com, psiddaiah@...sta.com
Subject: Re: [PATCH] ftrace: Fix improper usage of __trace_stack() function.

On 2022-07-23 12:19:43 [+0530], Anand Je Saipureddy wrote:
> In kernel/trace/trace_events_trigger.c --> stacktrace_trigger() -->
> __trace_stack() is not defined as per the function definition.
> 
> With commit edbaaa13a660
> ("tracing: Merge irqflags + preemt counter, add RT bits")
> the irqflags(flags) and preemption counter(preempt_count()) are
> now should be evaluated early by tracing_gen_ctx().
> 
> This patch replaces the irqflags and preemption counter
> with tracing_gen_ctx().
> 
> Fixes: 5e8446e3820c ("tracing: Dump stacktrace trigger to the corresponding instance")
> Signed-off-by: Anand Je Saipureddy <s.anandje1@...il.com>
> Reviewed-by: Corey Minyard <cminyard@...sta.com>

Please use [PATCH RT v5.10] in the future.
Luis, could you please pick it up?

> ---
>  kernel/trace/trace_events_trigger.c | 8 +++-----
>  1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
> index 75fef9fcfd0f..3c6229f16e81 100644
> --- a/kernel/trace/trace_events_trigger.c
> +++ b/kernel/trace/trace_events_trigger.c
> @@ -1220,12 +1220,10 @@ stacktrace_trigger(struct event_trigger_data *data, void *rec,
>  		   struct ring_buffer_event *event)
>  {
>  	struct trace_event_file *file = data->private_data;
> -	unsigned long flags;
>  
> -	if (file) {
> -		local_save_flags(flags);
> -		__trace_stack(file->tr, STACK_SKIP, preempt_count());
> -	} else
> +	if (file)
> +		__trace_stack(file->tr, tracing_gen_ctx(), STACK_SKIP);
> +	else
>  		trace_dump_stack(STACK_SKIP);
>  }
>  

Sebastian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ