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: <3e21b6e87e219d6538a193a9021b965fd8180025.camel@perches.com>
Date:   Thu, 17 Dec 2020 16:50:41 -0800
From:   Joe Perches <joe@...ches.com>
To:     Bjorn Helgaas <helgaas@...nel.org>,
        Andy Whitcroft <apw@...onical.com>
Cc:     linux-kernel@...r.kernel.org, Bjorn Helgaas <bhelgaas@...gle.com>
Subject: Re: [PATCH] checkpatch: add warning for non-lore mailing list URLs

On Thu, 2020-12-17 at 17:56 -0600, Bjorn Helgaas wrote:
> From: Bjorn Helgaas <bhelgaas@...gle.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*$/ ||


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ