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:   Sun, 21 Apr 2019 11:25:57 +0800
From:   Dave Young <dyoung@...hat.com>
To:     Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] checkpatch: mute SOB warning in case SOB exists but without
 From header

checkpatch.pl report below warning but the SOB line is correct:
$ ./scripts/checkpatch.pl patches/test.patch
WARNING: Missing Signed-off-by: line by nominal patch author ''

Actually checkpatch.pl assumes every patch includes "From:" line,
this is true for a git formated patch, some saved mail format patch.

But the warning is boring for people who do not use git formated patch.
Change the script only print warning in case "From:" line exists.

Signed-off-by: Dave Young <dyoung@...hat.com>
---
 scripts/checkpatch.pl |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- linux-x86.orig/scripts/checkpatch.pl
+++ linux-x86/scripts/checkpatch.pl
@@ -2283,7 +2283,7 @@ sub process {
 	our $clean = 1;
 	my $signoff = 0;
 	my $author = '';
-	my $authorsignoff = 0;
+	my $authorsignoff = -1;
 	my $is_patch = 0;
 	my $is_binding_patch = -1;
 	my $in_header_lines = $file ? 0 : 1;
@@ -2609,6 +2609,8 @@ sub process {
 				$l =~ s/"//g;
 				if ($l =~ /^\s*signed-off-by:\s*\Q$author\E/i) {
 				    $authorsignoff = 1;
+				} else {
+				    $authorsignoff = 0;
 				}
 			}
 		}
@@ -6649,7 +6651,7 @@ sub process {
 		if ($signoff == 0) {
 			ERROR("MISSING_SIGN_OFF",
 			      "Missing Signed-off-by: line(s)\n");
-		} elsif (!$authorsignoff) {
+		} elsif ($authorsignoff == 0) {
 			WARN("NO_AUTHOR_SIGN_OFF",
 			     "Missing Signed-off-by: line by nominal patch author '$author'\n");
 		}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ