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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1322526773.2075.7.camel@Joe-Laptop>
Date:	Mon, 28 Nov 2011 16:32:53 -0800
From:	Joe Perches <joe@...ches.com>
To:	Andy Whitcroft <apw@...onical.com>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 02/11] checkpatch: check for common memset parameter
 issues against statments

On Mon, 2011-11-28 at 15:42 +0000, Andy Whitcroft wrote:
> Move the memset checks over to work against the statement.  Also add
> checks for 0 and 1 used as lengths.  Generally these indicate badly
> ordered parameters.
[]
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
[]
> @@ -3111,6 +3111,28 @@ sub process {
>  			     "Avoid line continuations in quoted strings\n" . $herecurr);
>  		}
>  
> +# Check for misused memsets
> +		if (defined $stat && $stat =~ /\bmemset\s*\((.*)\)/s) {

Perhaps this is better.
It allows close parenthesis in the memset.
eg:	memset(foo, bar(baz), sizeof(foo));

	if (defined $stat && $stat = /\bmemset\s*$match_balanced_parentheses/s) {


--
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