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:   Tue, 13 Apr 2021 14:31:21 -0400
From:   Steven Rostedt <rostedt@...dmis.org>
To:     "Yordan Karadzhov (VMware)" <y.karadz@...il.com>
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de,
        peterz@...radead.org
Subject: Re: [PATCH v3 2/5] tracing: Add "last_func_repeats" to struct
 trace_array

On Fri,  9 Apr 2021 21:10:28 +0300
"Yordan Karadzhov (VMware)" <y.karadz@...il.com> wrote:

> --- a/kernel/trace/trace.h
> +++ b/kernel/trace/trace.h
> @@ -262,6 +262,17 @@ struct cond_snapshot {
>  	cond_update_fn_t		update;
>  };
>  
> +/*
> + * struct trace_func_repeats - used to keep track of the consecutive
> + * (on the same CPU) calls of a single function.
> + */
> +struct trace_func_repeats {
> +	unsigned long	ip;
> +	unsigned long	parent_ip;
> +	unsigned long	count;
> +	u64		ts_last_call;
> +};
> +
>  /*
>   * The trace array - an array of per-CPU trace arrays. This is the
>   * highest level data structure that individual tracers deal with.
> @@ -358,8 +369,15 @@ struct trace_array {
>  #ifdef CONFIG_TRACER_SNAPSHOT
>  	struct cond_snapshot	*cond_snapshot;
>  #endif
> +	struct trace_func_repeats	__percpu *last_func_repeats;
>  };
>  
> +static inline struct trace_func_repeats __percpu *
> +tracer_alloc_func_repeats(struct trace_array *tr)
> +{
> +	return tr->last_func_repeats = alloc_percpu(struct trace_func_repeats);
> +}

Also, is there a reason this is in the header file? It's only used in one C
file, and should be a static function there.

-- Steve


> +
>  enum {
>  	TRACE_ARRAY_FL_GLOBAL	= (1 << 0)
>  };

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ