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]
Message-ID: <1459924182.6715.30.camel@perches.com>
Date:	Tue, 05 Apr 2016 23:29:42 -0700
From:	Joe Perches <joe@...ches.com>
To:	Julia Lawall <julia.lawall@...6.fr>
Cc:	LKML <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 2/2] staging: slicoss: fix missing blank line (fwd)

On Wed, 2016-04-06 at 07:17 +0200, Julia Lawall wrote:
> I have the impression that __iomem is in the wrong place in the following 
> code.  Perhaps checkpatch could do something about that?  Coccinelle, 
> unfortunately, skips over such annotations, to simplify parsing...
[]
>        __iomem struct slic_regs *slic_regs = adapter->slic_regs;

Maybe so.

There aren't many of these in the kernel tree.

$ git grep -E "^\s+__iomem" | wc -l
46

And there are a whole lot more after the type,
so maybe this is appropriate.
---
 scripts/checkpatch.pl | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index e3d9c34..1b23495 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3400,6 +3400,14 @@ sub process {
 			}
 		}
 
+# check for attributions like __iomem before the type
+		while ($sline =~ m{(\b$Type\s*$Ident)}g) {
+			my $tmp = trim($1);
+			next if ($tmp !~ /^($Sparse)\b/);
+			WARN("ATTRIBUTE_LOCATION",
+			     "attribute '$1' should be positioned after the type\n" . $herecurr);
+		}
+
 # check for misordered declarations of char/short/int/long with signed/unsigned
 		while ($sline =~ m{(\b$TypeMisordered\b)}g) {
 			my $tmp = trim($1);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ