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: <20240108172256.48ebc777@gandalf.local.home>
Date: Mon, 8 Jan 2024 17:22:56 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Beau Belgrave <beaub@...ux.microsoft.com>
Cc: LKML <linux-kernel@...r.kernel.org>, Linux Trace Kernel
 <linux-trace-kernel@...r.kernel.org>, Masami Hiramatsu
 <mhiramat@...nel.org>, Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [PATCH] tracing user_events: Simplify user_event_parse_field()
 parsing

On Mon, 8 Jan 2024 17:13:12 -0500
Steven Rostedt <rostedt@...dmis.org> wrote:

> On Mon, 8 Jan 2024 21:47:44 +0000
> Beau Belgrave <beaub@...ux.microsoft.com> wrote:
> 
> > > -	len = str_has_prefix(field, "__rel_loc ");
> > > -	if (len)
> > > -		goto skip_next;
> > > +	if (!(len = str_has_prefix(field, "__data_loc unsigned ")) &&
> > > +	    !(len = str_has_prefix(field, "__data_loc ")) &&
> > > +	    !(len = str_has_prefix(field, "__rel_loc unsigned ")) &&
> > > +	    !(len = str_has_prefix(field, "__rel_loc "))) {
> > > +		goto parse;
> > > +	}    
> > 
> > This now triggers a checkpatch error:
> > ERROR: do not use assignment in if condition  
> 
> What a horrible message.
> 
> > #1184: FILE: kernel/trace/trace_events_user.c:1184:
> > +       if (!(len = str_has_prefix(field, "__data_loc unsigned ")) &&
> > 
> > I personally prefer to keep these files fully checkpatch clean.  
> 
> I've stopped using checkpatch years ago because I disagreed with so much it :-p
>   (Including this message)

Note that checkpatch is a guideline and not a rule. The general rule is, if
the code looks worse when applying the checkpatch rule, don't do it.

- Steve

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ