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: <CAJ7bepLDK8C=Vyz0QDuBEP4eCE5U4O7rM7KAZnbeeiRv__v2UA@mail.gmail.com>
Date: Tue, 19 Nov 2024 01:06:17 +0530
From: Advait Dhamorikar <advaitdhamorikar@...il.com>
To: Andy Whitcroft <apw@...onical.com>, Joe Perches <joe@...ches.com>, 
	Dwaipayan Ray <dwaipayanray1@...il.com>, Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc: linux-kernel@...r.kernel.org, skhan@...uxfoundation.org, 
	anupnewsmail@...il.com
Subject: Re: [PATCH RESEND] scripts/checkpatch: Fix multiple Reported-by:
 false positive warning

Hello Joe,

Please let me know if you have any feedback for this patch,
if there's something more that can be worked on in this fix.

Kind regards,
Advait

On Mon, 4 Nov 2024 at 11:09, Advait Dhamorikar
<advaitdhamorikar@...il.com> wrote:
>
> If multiple Reported-by: tags are used, the
> checkpatch script throws a false positive warning
> even when there is a Closes tag following the two
> tags. This fix checks if the closes tag is present
> after multiple Reported-by tags.
>
> Here is an example of the same:
> > WARNING: Reported-by: should be immediately followed by Closes: with a
> > URL to the report
> > #10:
> > Reported-by: Kernel test bot <ppppqqqq@...il.com>
> > Reported-by: Some Person <xxxyyy@...il.com>
>
> > total: 0 errors, 1 warnings, 0 checks, 8 lines checked
>
> Signed-off-by: Advait Dhamorikar <advaitdhamorikar@...il.com>
> ---
>  scripts/checkpatch.pl | 9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 4427572b2477..c74519f02180 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3188,10 +3188,13 @@ sub process {
>                         if ($sign_off =~ /^reported(?:|-and-tested)-by:$/i) {
>                                 if (!defined $lines[$linenr]) {
>                                         WARN("BAD_REPORTED_BY_LINK",
> -                                            "Reported-by: should be immediately followed by Closes: with a URL to the report\n" . $herecurr . "\n");
> -                               } elsif ($rawlines[$linenr] !~ /^closes:\s*/i) {
> +                                               "Reported-by: should be immediately followed by Closes: with a URL to the report\n" . $herecurr . "\n");
> +                               } elsif ($lines[$linenr] =~ /^reported(?:|-and-tested)-by:/i && $lines[$linenr + 1] =~ /^reported(?:|-and-tested)-by:/i) {
> +                                        # Do nothing if the next line is another Reported-by:
> +                }
> +                               elsif ($lines[$linenr]  =~ /^reported(?:|-and-tested)-by:/i && $lines[$linenr + 1] !~ /^closes:\s*/i) {
>                                         WARN("BAD_REPORTED_BY_LINK",
> -                                            "Reported-by: should be immediately followed by Closes: with a URL to the report\n" . $herecurr . $rawlines[$linenr] . "\n");
> +                                               "Reported-by: should be immediately followed by Closes: with a URL to the report\n" . "#" . ($linenr + 1) . ":" . "\n" . $rawlines[$linenr] . "\n");
>                                 }
>                         }
>                 }
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ