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]
Message-ID: <qye5vuh5hzoemdciohq3x4oofjpvw6pwe777loqacqfmhf4grg@5gtprhv3g377>
Date: Tue, 30 Jul 2024 09:22:53 +0200
From: Uwe Kleine-König <u.kleine-koenig@...libre.com>
To: Steven Rostedt <rostedt@...dmis.org>, 
	Masami Hiramatsu <mhiramat@...nel.org>
Cc: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>, 
	linux-pwm@...r.kernel.org, linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: Make info in traces about affected pwm more useful

Hello,

On Fri, Jul 05, 2024 at 11:14:51PM +0200, Uwe Kleine-König wrote:
> The hashed pointer isn't useful to identify the pwm device. Instead
> store and emit chipid and hwpwm.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@...libre.com>
> ---
>  include/trace/events/pwm.h | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/include/trace/events/pwm.h b/include/trace/events/pwm.h
> index 12b35e4ff917..8022701c446d 100644
> --- a/include/trace/events/pwm.h
> +++ b/include/trace/events/pwm.h
> @@ -15,7 +15,8 @@ DECLARE_EVENT_CLASS(pwm,
>  	TP_ARGS(pwm, state, err),
>  
>  	TP_STRUCT__entry(
> -		__field(struct pwm_device *, pwm)
> +		__field(unsigned int, chipid)
> +		__field(unsigned int, hwpwm)
>  		__field(u64, period)
>  		__field(u64, duty_cycle)
>  		__field(enum pwm_polarity, polarity)
> @@ -24,7 +25,8 @@ DECLARE_EVENT_CLASS(pwm,
>  	),
>  
>  	TP_fast_assign(
> -		__entry->pwm = pwm;
> +		__entry->chipid = pwm->chip->id;
> +		__entry->hwpwm = pwm->hwpwm;
>  		__entry->period = state->period;
>  		__entry->duty_cycle = state->duty_cycle;
>  		__entry->polarity = state->polarity;
> @@ -32,8 +34,8 @@ DECLARE_EVENT_CLASS(pwm,
>  		__entry->err = err;
>  	),
>  
> -	TP_printk("%p: period=%llu duty_cycle=%llu polarity=%d enabled=%d err=%d",
> -		  __entry->pwm, __entry->period, __entry->duty_cycle,
> +	TP_printk("pwmchip%u.%u: period=%llu duty_cycle=%llu polarity=%d enabled=%d err=%d",
> +		  __entry->chipid, __entry->hwpwm, __entry->period, __entry->duty_cycle,
>  		  __entry->polarity, __entry->enabled, __entry->err)
>  
>  );

I think the patch is obvious enough to be ok even without the tracing
maintainer's blessing. I applied it to
https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
.

Best regards
Uwe

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ