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] [day] [month] [year] [list]
Message-ID: <20250917203448.569ac415@nimda.home>
Date: Wed, 17 Sep 2025 20:34:48 +0300
From: Onur Özkan <work@...rozkan.dev>
To: Joe Perches <joe@...ches.com>
Cc: linux-kernel@...r.kernel.org, apw@...onical.com,
 dwaipayanray1@...il.com, lukas.bulwahn@...il.com
Subject: Re: [PATCH] checkpatch: warn on unhandled placeholders in cover
 letters

On Wed, 17 Sep 2025 08:43:16 -0700
Joe Perches <joe@...ches.com> wrote:

> On Wed, 2025-09-17 at 17:01 +0300, Onur Özkan wrote:
> > On Wed, 17 Sep 2025 14:49:09 +0300
> > Onur Özkan <work@...rozkan.dev> wrote:
> > 
> > > Adds a new check to detect unhandled placeholders in cover
> > > letters. This prevents sending patch series with incomplete cover
> > > letters containing auto generated subject or blurb lines such as:
> > > 
> > >     *** SUBJECT HERE ***
> > >     *** BLURB HERE ***
> []
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> []
> > > @@ -3339,6 +3339,15 @@ sub process {
> > >  				$fixed[$fixlinenr] =~ s/^/ /;
> > >  			}
> > >  		}
> > > +# Check for unhandled placeholder text in cover letters
> > > +		if ($filename =~ /cover-letter\.patch$/) {
> 
> Probably don't need this $filename test but do need
> some test and code like
> 
> 		if (($in_commit_log || $in_header_lines) &&
> 		    $rawline =~ /(?:SUBJECT|BLURB) HERE/) {
> 			ERROR("PLACEHOLDER_USE",
> 			      "Placeholder text detected\n" .
> $herecurr); }
> 
> > > +			if ($rawline =~ /^\+Subject:.*\*\*\*
> > > SUBJECT HERE \*\*\*/ ||
> > > +				$rawline =~ /^\+\*\*\* BLURB HERE
> > > \*\*\*/) {
> > > +				my $placeholder = $1 || $2;
> 
> $placeholder isn't useful.
> 

That was a left-over, sorry.

> > > +				WARN("COVER_LETTER_PLACEHOLDER",
> 
> s/WARN/ERROR/
> 
> > > +					 "Incomplete cover
> > > letter: placeholder text detected\n" . $herecurr);
> > > +			}
> > > +		}
> []
> > I wasn't aware of the checkpatch documentation in
> > "Documentation/dev-tools/checkpatch.rst" file. I guess
> > COVER_LETTER_PLACEHOLDER needs to be documented there?
> 
> yes.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ