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>] [day] [month] [year] [list]
Date:	Wed, 29 Feb 2012 11:41:53 -0800
From:	Joe Perches <joe@...ches.com>
To:	Andy Whitcroft <apw@...dowen.org>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: checkpatch hangs, memset failures, and minimum versions

Hey Andy.

There's a problem with the memset tests that cause
the checkpatch script to fail oddly.

This test:

# Check for misused memsets
		if (defined $stat &&
		    $stat =~ /^\+(?:.*?)\bmemset\s*\(\s*$FuncArg\s*,\s*$FuncArg\s*\,\s*$FuncArg\s*\)/s) {

can sometimes never advance and can just consume cpu
so that the script hangs.

It works properly if $FuncArg (actually $LvalOrFunc)
is changed from

our $balanced_parens = qr/(\((?:[^\(\)]++|(?-1))*\))/;
our $lval_parens = qr/(\((?:[^\(\)]+|(-1))*\))/;

our $Typecast	= qr{\s*(\(\s*$NonptrType\s*\)){0,1}\s*};
our $LvalOrFunc	= qr{($Lval)\s*($lval_parens{0,1})\s*};
our $FuncArg = qr{$Typecast{0,1}($LvalOrFunc|$Constant)};

to

our $LvalOrFunc	= qr{($Lval)\s*($balanced_parens{0,1})\s*};

the balanced_parens use requires perl 5.10

This change can also help fix a problem with a --strict check
to calculate the correct position for a continuation line that
should align on an open parenthesis.  That test does require
an additional change though.

Suggestions?

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