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:	Sat, 20 Sep 2008 23:59:42 +0200
From:	Wolfram Sang <w.sang@...gutronix.de>
To:	linux-kernel@...r.kernel.org
Cc:	apw@...dowen.org
Subject: [PATCH] [CHECKPATCH] Check for p0-patches

Check if the patch is most likely a p0-patch and give a warning if so.

Signed-off-by: Wolfram Sang <w.sang@...gutronix.de>
---
 scripts/checkpatch.pl |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Index: playground/scripts/checkpatch.pl
===================================================================
--- playground.orig/scripts/checkpatch.pl
+++ playground/scripts/checkpatch.pl
@@ -986,6 +986,7 @@
 	my $in_comment = 0;
 	my $comment_edge = 0;
 	my $first_line = 0;
+	my $p1_prefix = '';
 
 	my $prev_values = 'E';
 
@@ -1123,7 +1124,12 @@
 		# extract the filename as it passes
 		if ($line=~/^\+\+\+\s+(\S+)/) {
 			$realfile = $1;
-			$realfile =~ s@^[^/]*/@@;
+			$realfile =~ s@^([^/]*)/@@;
+
+			$p1_prefix = $1;
+			if ($tree && -e "$root/$p1_prefix") {
+				WARN("Patch prefix '$p1_prefix' exists. Is it maybe a p0-patch?\n");
+			}
 
 			if ($realfile =~ m@...lude/asm/@) {
 				ERROR("do not modify files in include/asm, change architecture specific files in include/asm-<architecture>\n" . "$here$rawline\n");
-- 
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry

Download attachment "signature.asc" of type "application/pgp-signature" (198 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ