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: <alpine.DEB.2.21.2007272229280.15655@felia>
Date:   Mon, 27 Jul 2020 22:34:37 +0200 (CEST)
From:   Lukas Bulwahn <lukas.bulwahn@...il.com>
To:     Nachiket Naganure <nachiketun8@...il.com>
cc:     Joe Perches <joe@...ches.com>, apw@...onical.com,
        lukas.bulwahn@...il.com, skhan@...uxfoundation.org,
        linux-kernel@...r.kernel.org,
        linux-kernel-mentees@...ts.linuxfoundation.org
Subject: Re: [PATCH] checkpatch: disable commit log length check warning for
 signature tag



On Mon, 27 Jul 2020, Nachiket Naganure wrote:

> On Sun, Jul 26, 2020 at 11:14:42PM -0700, Joe Perches wrote:
> > On Mon, 2020-07-27 at 11:24 +0530, Nachiket Naganure wrote:
> > > Disable commit log length check in case of signature tag. If the commit
> > > log line has valid signature tags such as "Reported-and-tested-by" with
> > > more than 75 characters, suppress the long length warning.
> > > 
> > > For instance in commit ac854131d984 ("USB: core: Fix misleading driver bug
> > > report"), the corresponding patch contains a "Reported by" tag line which
> > > exceeds 75 chars. And there is no valid way to shorten the length.
> > > 
> > > Signed-off-by: Nachiket Naganure <nachiketun8@...il.com>
> > > ---
> > >  scripts/checkpatch.pl | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > > index 197436b20288..46237e9e0550 100755
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -2806,6 +2806,8 @@ sub process {
> > >  					# filename then :
> > >  		      $line =~ /^\s*(?:Fixes:|Link:)/i ||
> > >  					# A Fixes: or Link: line
> > > +		      $line =~ /$signature_tags/ ||
> > > +					# Check for signature_tags
> > >  		      $commit_log_possible_stack_dump)) {
> > >  			WARN("COMMIT_LOG_LONG_LINE",
> > >  			     "Possible unwrapped commit description (prefer a maximum 75 chars per line)\n" . $herecurr);
> > 
> > OK, but the test should be:
> > 
> > 		      $line =~ /^\s*$signature_tags/ ||
> > 
> > so the line has to start with a signature and
> > it won't match on signature tags in the middle
> > of other content on the same line.
> > 
> > 
> But the suggested won't work in case of merged signatures.
> Such as "Reported-and-tested-by: user@...il.com"
> 

But Joe's remark is valid; we do not want to match on signature tags in 
the middle. These cases are probably mentioning signature tags as part of 
a sentence or some explanation.

Nachiket, think about a proper solution for this issue.

The evaluation data from running checkpatch.pl on previous commits will 
provide you some guidance on which heuristics might work and which not.

Lukas

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ