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]
Date:   Fri, 11 Feb 2022 15:40:05 -0500
From:   Steven Rostedt <rostedt@...dmis.org>
To:     Christophe Leroy <christophe.leroy@...roup.eu>
Cc:     Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org
Subject: Re: [PATCH v2] tracing: uninline trace_trigger_soft_disabled()
 partly

On Fri, 11 Feb 2022 08:10:18 +0100
Christophe Leroy <christophe.leroy@...roup.eu> wrote:

> diff --git a/include/linux/trace_events.h b/include/linux/trace_events.h
> index 70c069aef02c..dcea51fb60e2 100644
> --- a/include/linux/trace_events.h
> +++ b/include/linux/trace_events.h
> @@ -699,6 +699,8 @@ event_triggers_post_call(struct trace_event_file *file,
>  
>  bool trace_event_ignore_this_pid(struct trace_event_file *trace_file);
>  
> +bool __trace_trigger_soft_disabled(struct trace_event_file *file);
> +
>  /**
>   * trace_trigger_soft_disabled - do triggers and test if soft disabled
>   * @file: The file pointer of the event to test
> @@ -708,20 +710,20 @@ bool trace_event_ignore_this_pid(struct trace_event_file *trace_file);
>   * triggers that require testing the fields, it will return true,
>   * otherwise false.
>   */
> -static inline bool
> +static __always_inline bool
>  trace_trigger_soft_disabled(struct trace_event_file *file)
>  {
>  	unsigned long eflags = file->flags;
>  
> -	if (!(eflags & EVENT_FILE_FL_TRIGGER_COND)) {
> -		if (eflags & EVENT_FILE_FL_TRIGGER_MODE)
> -			event_triggers_call(file, NULL, NULL, NULL);
> -		if (eflags & EVENT_FILE_FL_SOFT_DISABLED)
> -			return true;
> -		if (eflags & EVENT_FILE_FL_PID_FILTER)
> -			return trace_event_ignore_this_pid(file);
> -	}
> -	return false;
> +	if (likely(!(eflags & (EVENT_FILE_FL_TRIGGER_MODE |
> +			       EVENT_FILE_FL_SOFT_DISABLED |
> +			       EVENT_FILE_FL_PID_FILTER))))
> +		return false;
> +
> +	if (likely(eflags & EVENT_FILE_FL_TRIGGER_COND))
> +		return false;
> +
> +	return __trace_trigger_soft_disabled(file);
>  }
>  
>  #ifdef CONFIG_BPF_EVENTS
> diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c
> index d00fee705f9c..55de490e25ca 100644
> --- a/kernel/trace/trace_events_trigger.c
> +++ b/kernel/trace/trace_events_trigger.c
> @@ -84,6 +84,20 @@ event_triggers_call(struct trace_event_file *file,
>  }
>  EXPORT_SYMBOL_GPL(event_triggers_call);
>  
> +bool __trace_trigger_soft_disabled(struct trace_event_file *file)
> +{
> +	unsigned long eflags = file->flags;
> +
> +	if (eflags & EVENT_FILE_FL_TRIGGER_MODE)
> +		event_triggers_call(file, NULL, NULL, NULL);
> +	if (eflags & EVENT_FILE_FL_SOFT_DISABLED)
> +		return true;
> +	if (eflags & EVENT_FILE_FL_PID_FILTER)
> +		return trace_event_ignore_this_pid(file);
> +	return false;
> +}
> +EXPORT_SYMBOL_GPL(__trace_trigger_soft_disabled);
> +
>  /**
>   * event_triggers_post_call - Call 'post_triggers' for a trace event
>   * @file: The trace_event_file associated with the event
> -- 


This version looks fine to me. I'll pull it into my queue.

Thanks!

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ