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: <20251112103034.5ad110db@gandalf.local.home>
Date: Wed, 12 Nov 2025 10:30:34 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
Cc: Donglin Peng <dolinux.peng@...il.com>,
 linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org, Donglin
 Peng <pengdonglin@...omi.com>, Sven Schnelle <svens@...ux.ibm.com>
Subject: Re: [PATCH v3 RESEND] function_graph: Enable funcgraph-args and
 funcgraph-retaddr to work simultaneously

On Wed, 12 Nov 2025 14:17:05 +0900
Masami Hiramatsu (Google) <mhiramat@...nel.org> wrote:

> >  #if defined(CONFIG_FUNCTION_GRAPH_RETVAL) || defined(CONFIG_FUNCTION_GRAPH_RETADDR)
> > @@ -869,10 +858,12 @@ static void print_graph_retval(struct trace_seq *s, struct ftrace_graph_ent_entr
> >  		trace_seq_printf(s, "%ps", func);
> >  
> >  		if (args_size >= FTRACE_REGS_MAX_ARGS * sizeof(long)) {
> > -			print_function_args(s, entry->args, (unsigned long)func);
> > +			print_function_args(s, entry->args + ARGS_OFFS(args_size),
> > +					    (unsigned long)func);
> >  			trace_seq_putc(s, ';');
> > -		} else
> > +		} else {  
> 
> nit: you don't need to add braces for a single line block.
> 
> >  			trace_seq_puts(s, "();");
> > +		}
> >  

Actually you do.

The rule for if/else is if one side requires { }, then both do.

  https://docs.kernel.org/process/coding-style.html#placing-braces-and-spaces

Yes, this has been inconsistent and my older code breaks this rule, but I
try to follow it in newer code.

-- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ