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: <d38804da61e219e617b056a176cf8755c74c90d5.camel@kernel.org>
Date:   Thu, 24 Feb 2022 09:41:33 -0600
From:   Tom Zanussi <zanussi@...nel.org>
To:     Daniel Bristot de Oliveira <bristot@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>
Cc:     linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] tracing: Dump stacktrace trigger to the corresponding
 instance

Hi Daniel,

On Sun, 2022-02-20 at 23:49 +0100, Daniel Bristot de Oliveira wrote:
> The stacktrace event trigger is dumping the stacktrace to the
> instance
> where it was enabled, but to the global "instance."
> 
> Use the private_data, pointing to the trigger file, to figure out the
> corresponding trace instance, and use it in the trigger action, like
> snapshot_trigger does.
> 
> Cc: Steven Rostedt <rostedt@...dmis.org>
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: Tom Zanussi <zanussi@...nel.org>
> Signed-off-by: Daniel Bristot de Oliveira <bristot@...nel.org>
> ---
>  kernel/trace/trace_events_trigger.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/kernel/trace/trace_events_trigger.c
> b/kernel/trace/trace_events_trigger.c
> index d00fee705f9c..e0d50c9577f3 100644
> --- a/kernel/trace/trace_events_trigger.c
> +++ b/kernel/trace/trace_events_trigger.c
> @@ -1540,7 +1540,12 @@ stacktrace_trigger(struct event_trigger_data
> *data,
>  		   struct trace_buffer *buffer,  void *rec,
>  		   struct ring_buffer_event *event)
>  {
> -	trace_dump_stack(STACK_SKIP);
> +	struct trace_event_file *file = data->private_data;
> +
> +	if (file)
> +		__trace_stack(file->tr, tracing_gen_ctx(), STACK_SKIP);
> +	else
> +		trace_dump_stack(STACK_SKIP);
>  }
>  
>  static void


Looks good to me.

Reviewed-by: Tom Zanussi <zanussi@...nel.org>
Tested-by: Tom Zanussi <zanussi@...nel.org>

Thanks,

Tom




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ