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]
Message-ID: <1260341479.27677.193.camel@Joe-Laptop.home>
Date:	Tue, 08 Dec 2009 22:51:19 -0800
From:	Joe Perches <joe@...ches.com>
To:	Ingo Molnar <mingo@...e.hu>
Cc:	Andy Whitcroft <apw@...onical.com>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Andreas Herrmann <herrmann.der.user@...glemail.com>
Subject: [PATCH] checkpatch.pl: Warn on pr_<level> or dev_<level> with
 KERN_<level>

On Wed, 2009-12-09 at 07:05 +0100, Ingo Molnar wrote:
> ( Andy: i suspect checkpatch could also grow a new warning perhaps, the
>   '\<pr_.*(KERN_.*' pattern will i suspect pinpoint something fishy in 
>   most cases. )

Signed-off-by: Joe Perches <joe@...ches.com>
---
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index bc4114f..ffd8210 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1832,6 +1832,12 @@ sub process {
 			}
 		}
 
+# pr_<level> and dev_<level> should not use KERN_* levels
+
+		if ($line =~ /\b(pr_|dev_)[a-z]+.*KERN_/) {
+			WARN("pr_<level>() and dev_<level> should not include KERN_ facility level\n" . $herecurr);
+		}
+
 # function brace can't be on same line, except for #defines of do while,
 # or if closed on same line
 		if (($line=~/$Type\s*$Ident\(.*\).*\s{/) and


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