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: <20250226111156.3e9bb653@gandalf.local.home>
Date: Wed, 26 Feb 2025 11:11:56 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org, Mark
 Rutland <mark.rutland@....com>, Mathieu Desnoyers
 <mathieu.desnoyers@...icios.com>, Andrew Morton
 <akpm@...ux-foundation.org>, Sven Schnelle <svens@...ux.ibm.com>, Paul
 Walmsley <paul.walmsley@...ive.com>, Palmer Dabbelt <palmer@...belt.com>,
 Albert Ou <aou@...s.berkeley.edu>, Guo Ren <guoren@...nel.org>, Donglin
 Peng <dolinux.peng@...il.com>, Zheng Yejian <zhengyejian@...weicloud.com>,
 bpf@...r.kernel.org
Subject: Re: [PATCH v3 2/4] ftrace: Add support for function argument to
 graph tracer

On Wed, 26 Feb 2025 23:48:52 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> > -	event = trace_buffer_lock_reserve(buffer, TRACE_GRAPH_ENT,
> > -					  sizeof(*entry), trace_ctx);
> > +	/* If fregs is defined, add FTRACE_REGS_MAX_ARGS long size words */
> > +	size = sizeof(*entry) + (FTRACE_REGS_MAX_ARGS * !!fregs * sizeof(long));  
> 
> Is `!!fregs` always 1 if fregs != NULL? (seems to depend on compiler)

Yes, C guarantees that ! is either 1 or zero. If you want to convert
something from non zero to 1, the C convention is "!!".

> 
> Others looks good to me.
> 
> Reviewed-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>


Thanks!

-- Steve


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ