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: <187fa03a3690806748ca7cfd2b61728c0d33dcf0.camel@perches.com>
Date:   Mon, 24 Feb 2020 22:49:15 -0800
From:   Joe Perches <joe@...ches.com>
To:     John Stultz <john.stultz@...aro.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Andy Whitcroft <apw@...onical.com>
Subject: Re: [RFC][PATCH] checkpatch: Properly warn if Change-Id comes after
 first Signed-off-by line

On Mon, 2020-02-24 at 20:48 -0800, John Stultz wrote:
> On Mon, Feb 24, 2020 at 6:13 PM Joe Perches <joe@...ches.com> wrote:
> > On Mon, 2020-02-24 at 23:58 +0000, John Stultz wrote:
> > > Quite often, the Change-Id may be between Signed-off-by: lines or
> > > at the end of them. Unfortunately checkpatch won't catch these
> > > cases as it disables in_commit_log when it catches the first
> > > Signed-off-by line.
> > > 
> > > This has bitten me many many times.
> > 
> > Hmm.  When is change-id used in your workflow?
> 
> Since I have a few kernel repos that I use for both upstream work and
> work targeting AOSP trees, I usually have the gerrit commit hook
> enabled in my tree (its easier to strip with sed then it is to re-add
> after submitting to gerrit), and at least the commit-msg hook I have
> will usually append a Change-Id: line at the end of the commit
> message, usually after the signed-off-by line.

Perhaps this is better:
---
 scripts/checkpatch.pl | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index a63380..698c7c8 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2721,9 +2721,9 @@ sub process {
 		}
 
 # Check for unwanted Gerrit info
-		if ($in_commit_log && $line =~ /^\s*change-id:/i) {
+		if ($realfile eq '' && $line =~ /^\s*change-id:/i) {
 			ERROR("GERRIT_CHANGE_ID",
-			      "Remove Gerrit Change-Id's before submitting upstream.\n" . $herecurr);
+			      "Remove Gerrit Change-Id's before submitting upstream\n" . $herecurr);
 		}
 
 # Check if the commit log is in a possible stack dump


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ