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:	Thu, 27 Aug 2015 00:22:39 -0700
From:	Joe Perches <joe@...ches.com>
To:	Nicolas Morey Chaisemartin <nmorey@...ray.eu>
Cc:	Viresh Kumar <viresh.kumar@...aro.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Dan Carpenter <dan.carpenter@...cle.com>,
	Greg KH <gregkh@...uxfoundation.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Mike Holmes <mike.holmes@...aro.org>
Subject: Re: [PATCH] checkpatch: add --strict "pointer comparison to NULL"
 test

On Thu, 2015-08-27 at 09:09 +0200, Nicolas Morey Chaisemartin wrote:
> > From: "Joe Perches" <joe@...ches.com>
[]
> > And because most likely, "CONST test variable" checks like
> > 	NULL != foo
> > and
> > 	0 < bar
> > 
> > should probably be a separate test.
[]
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> > +				if ($comp eq "<") {
> > +					$newcomp = ">=";
> > +				} elsif ($comp eq "<=") {
> > +					$newcomp = ">";
> > +				} elsif ($comp eq ">") {
> > +					$newcomp = "<=";
> > +				} elsif ($comp eq ">=") {
> > +					$newcomp = "<";
> > +				}
> 
> I like the concept but are you sure about this?
> I think the "=" should be added or removed. If a < b, b > a, not b >= a.

Right thanks, it's obviously incorrect.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ