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:	Tue, 29 Jan 2013 20:30:05 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	Joe Perches <joe@...ches.com>, Valdis.Kletnieks@...edu,
	cocci@...teme.lip6.fr,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jslaby@...e.cz>,
	Paul Fulghum <paulkf@...rogate.com>,
	David Howells <dhowells@...hat.com>,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: coccinelle and bitmask arithmetic (was: Re: [patch] TTY:
 synclink, small cleanup in dtr_rts())

On Tue, Jan 29, 2013 at 05:19:43PM +0100, Julia Lawall wrote:
> If the definition of a bitmask is an identifier in all capital letters,
> that would be easy.  Another possibility is such an identifier that is
> defined to a value expressed beginning with 0x.  Another possibility is
> such an identifier that is sometimes used with & and | and sometimes used
> with an arithmetic operation.  I will give them a try.
> 

Oddly enough, this thread started because I wrote a script to do
this in Smatch.  It turns out not as useful as I had hoped, so I
wasn't planning to push it.

Anyway, I've gzipped it and attached it.  It's 350k because it has
a list of 50k macros which were used as bit masks.  Hopefully, it's
helpful.

It generates 350 warnings, but they are almost all false positives.
I have sent two patches based on the output.

regards,
dan carpenter


Download attachment "0001-check_bit_masks-complain-if-bitmasks-are-used-for-ma.patch.gz" of type "application/octet-stream" (353926 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ