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]
Date:   Fri, 22 Feb 2019 08:48:25 -0700
From:   Jonathan Corbet <corbet@....net>
To:     Aurélien Cedeyn <aurelien.cedeyn@...il.com>
Cc:     linux-kernel@...r.kernel.org, tglx@...utronix.de,
        akpm@...ux-foundation.org, gregkh@...uxfoundation.org
Subject: Re: [PATCH] scripts/spdxcheck.py: fix C++ comment style detection

On Wed, 20 Feb 2019 22:18:34 +0100
Aurélien Cedeyn <aurelien.cedeyn@...il.com> wrote:

> With the last commit to support the SuperH boot code files, we have the
> following regression:
> 
> $ ./scripts/checkpatch.pl -f <(echo '/* SPDX-License-Identifier: MIT */')
> WARNING: 'SPDX-License-Identifier: MIT */' is not supported in LICENSES/..
> +/* SPDX-License-Identifier: MIT */
> 
> total: 0 errors, 1 warnings, 1 lines checked
> 
> NOTE: For some of the reported defects, checkpatch may be able to
> mechanically convert to the typical style using --fix or --fix-inplace.
> 
> /dev/fd/63 has style problems, please review.
> 
> NOTE: If any of the errors are false positives, please report
>       them to the maintainer, see CHECKPATCH in MAINTAINERS.
> 
> This is not obvious, but spdxcheck.py is launched in checkpatch.pl with :
>     ...
>     } elsif ($rawline =~ /(SPDX-License-Identifier: .*)/) {
>         my $spdx_license = $1;
>         if (!is_SPDX_License_valid($spdx_license)) {
>             WARN("SPDX_LICENSE_TAG",
>                  "'$spdx_license' is not supported in LICENSES/...\n" . \
>                  $herecurr);
>         }
>     ...
>     sub is_SPDX_License_valid {
>         my ($license) = @_;
>         ...
>         my $status = `cd "$root_path"; echo "$license" |
>                       python scripts/spdxcheck.py -`;
>         ...
>     }
> 
> The first chars before 'SPDX-License-Identifier:' are ignored.
> This commit fixes this regression.
> 
> Fixes:959b49687838 (scripts/spdxcheck.py: Handle special quotation mark comments)
> Signed-off-by:Aurélien Cedeyn <aurelien.cedeyn@...il.com>

I've applied this, thanks, though that parsing code still looks a little
fragile.  It needs a proper regex perhaps someday...:)

Thanks,

jon

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ