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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9675d6ac5ba6ff51d47177d3802156e2007b494e.camel@perches.com>
Date: Wed, 04 Feb 2026 14:21:10 -0800
From: Joe Perches <joe@...ches.com>
To: Tim Bird <tim.bird@...y.com>, apw@...onical.com,
 dwaipayanray1@...il.com, 	lukas.bulwahn@...il.com
Cc: linux-spdx@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] checkpatch: add check for missing */ in spdx line

On Wed, 2026-02-04 at 14:38 -0700, Tim Bird wrote:
> Add an explicit check for leading /* but missing */
> to avoid a malformed SPDX line.
> 
> In many cases an SPDX-License-Identifier line immediately
> precedes another C-style comment.  In that case, if
> the SPDX line starts with '/*' but is missing the closing '*/',
> the compiler may not catch it (the leading '/*' on
> the next line and the rest of the header comment is just
> treated as part of the SPDX comment).

Nack.  There too many existing uses.

$ git grep '^/\*.*SPDX' | grep -v '\*/'| wc -l
855

> 
> Signed-off-by: Tim Bird <tim.bird@...y.com>
> ---
>  scripts/checkpatch.pl | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index c0250244cf7a..1cc3fd5e72af 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3794,6 +3794,11 @@ sub process {
>  					WARN("SPDX_LICENSE_TAG",
>  					     "Improper SPDX comment style for '$realfile', please use '$comment' instead\n" . $herecurr);
>  				}
> +				if ($comment eq '/*' &&
> +				    $rawline !~ m@\*/@) {
> +					WARN("SPDX_LICENSE_TAG",
> +					     "Improper SPDX comment style for '$realfile', missing closing '*/'\n" . $herecurr);
> +				}
>  
>  				if ($comment !~ /^$/ &&
>  				    $rawline !~ m@^\+\Q$comment\E SPDX-License-Identifier: @) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ