linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Kees Cook <keescook@chromium.org>
Cc: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
	linux-kernel@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: [PATCH] checkpatch: add warning for non-lore mailing list URLs
Date: Wed, 10 Feb 2021 11:45:51 -0600	[thread overview]
Message-ID: <20210210174551.GA593525@bjorn-Precision-5520> (raw)
In-Reply-To: <202102092344.22A86166@keescook>

On Wed, Feb 10, 2021 at 12:22:35AM -0800, Kees Cook wrote:
> On Thu, Dec 17, 2020 at 04:50:41PM -0800, Joe Perches wrote:
> > On Thu, 2020-12-17 at 17:56 -0600, Bjorn Helgaas wrote:
> > > From: Bjorn Helgaas <bhelgaas@google.com>
> > > 
> > > The lkml.org, marc.info, spinics.net, etc archives are not quite as useful
> > > as lore.kernel.org because they use different styles, add advertising, and
> > > may disappear in the future.  The lore archives are more consistent and
> > > more likely to stick around, so prefer https://lore.kernel.org URLs when
> > > they exist.
> > 
> > Hi Bjorn.
> > 
> > I like the idea, thanks, but a couple notes.
> > 
> > > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > []
> > > @@ -564,6 +564,17 @@ sub find_standard_signature {
> > >  	return "";
> > >  }
> >  
> > > +our $obsolete_archives = qr{(?xi:
> > > +	freedesktop.org/archives/dri-devel|
> > > +	lists.infradead.org|
> > > +	lkml.org|
> > > +	mail-archive.com|
> > > +	mailman.alsa-project.org/pipermail|
> > > +	marc.info|
> > > +	ozlabs.org/pipermail|
> > > +	spinics.net
> > > +)};
> > 
> > Strictly, these all need \Q \E escaping so uses like lkmlAorg do not match.
> > 
> > 
> > > @@ -3101,6 +3112,12 @@ sub process {
> > >  			}
> > >  		}
> > >  
> > > +# Check for mailing list archives other than lore.kernel.org
> > > +		if ($line =~ /(http|https):\/\/\S*$obsolete_archives/) {
> > 
> > The https?:// doesn't seem necessary.  Perhaps:
> > 
> > 		if ($line =~ m{\b$obsolete_archives}) {
> > 
> > > +			WARN("PREFER_LORE_ARCHIVE",
> > > +			     "Use lore.kernel.org archive links when possible; see https://lore.kernel.org/lists.html\n" . $herecurr);
> > 
> > Perhaps:
> > 			     "Prefer lore.kernel.org links. see: https://www.kernel.org/lore.html#linking-to-list-discussions-from-commits\n" . $herecurr);
> > 
> > So maybe instead:
> > ---
> >  scripts/checkpatch.pl | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> > 
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 00085308ed9d..c2a324d628a6 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -564,6 +564,17 @@ sub find_standard_signature {
> >  	return "";
> >  }
> >  
> > +our $obsolete_archives = qr{(?xi:
> > +	\Qfreedesktop.org/archives/dri-devel\E |
> > +	\Qlists.infradead.org\E |
> > +	\Qlkml.org\E |
> > +	\Qmail-archive.com\E |
> > +	\Qmailman.alsa-project.org/pipermail\E |
> > +	\Qmarc.info\E |
> > +	\Qozlabs.org/pipermail\E |
> > +	\Qspinics.net\E
> > +)};
> > +
> >  our @typeListMisordered = (
> >  	qr{char\s+(?:un)?signed},
> >  	qr{int\s+(?:(?:un)?signed\s+)?short\s},
> > @@ -3101,6 +3112,12 @@ sub process {
> >  			}
> >  		}
> >  
> > +		# Check for mailing list archives other than lore.kernel.org
> > +		if ($rawline =~ m{\b$obsolete_archives}) {
> > +			WARN("PREFER_LORE_ARCHIVE",
> > +			     "Use lore.kernel.org archive links when possible - see https://lore.kernel.org/lists.html\n" . $herecurr);
> > +		}
> > +
> >  # Check for added, moved or deleted files
> >  		if (!$reported_maintainer_file && !$in_commit_log &&
> >  		    ($line =~ /^(?:new|deleted) file mode\s*\d+\s*$/ ||
> > 
> > 
> 
> Ah, nice. Yes, this would be great to get added. Joe, can you respin as
> a full path? Please consider it:

I hate to ask Joe to rework *my* patch just because I've dropped the
ball on it!  Sorry, I'll try to resurrect this.

> Reviewed-by: Kees Cook <keescook@chromium.org>

  reply	other threads:[~2021-02-10 17:47 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 23:56 [PATCH] checkpatch: add warning for non-lore mailing list URLs Bjorn Helgaas
2020-12-18  0:50 ` Joe Perches
2021-02-10  8:22   ` Kees Cook
2021-02-10 17:45     ` Bjorn Helgaas [this message]
2022-04-01 20:14 Bjorn Helgaas
2022-04-01 20:50 ` Randy Dunlap
2022-04-01 21:26   ` Bjorn Helgaas
2022-04-02  8:00     ` Kalle Valo
2022-10-19 20:28 Bjorn Helgaas
2022-10-19 21:12 ` Joe Perches
2022-11-04  1:07 ` Peter Collingbourne
2022-11-04  1:27   ` Joe Perches
2022-11-04  1:34     ` Peter Collingbourne
2022-11-04  1:40       ` Joe Perches
2022-11-04 16:49         ` Peter Collingbourne
2022-11-07 20:54       ` Bjorn Helgaas
2022-11-07 21:00         ` Peter Collingbourne
2022-11-14 22:43           ` Bjorn Helgaas
2022-11-14 22:50             ` Peter Collingbourne

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210210174551.GA593525@bjorn-Precision-5520 \
    --to=helgaas@kernel.org \
    --cc=apw@canonical.com \
    --cc=bhelgaas@google.com \
    --cc=joe@perches.com \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).