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]
Date:   Sun, 6 Jun 2021 00:14:50 +0530
From:   Dwaipayan Ray <dwaipayanray1@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     linux-kernel <linux-kernel@...r.kernel.org>,
        Lukas Bulwahn <lukas.bulwahn@...il.com>
Subject: Re: [PATCH] checkpatch: Fix check for embedded filename

On Sun, Jun 6, 2021 at 12:03 AM Joe Perches <joe@...ches.com> wrote:
>
> On Sat, 2021-06-05 at 23:03 +0530, Dwaipayan Ray wrote:
> > On Sat, Jun 5, 2021 at 10:51 PM Joe Perches <joe@...ches.com> wrote:
> > >
> > > On Sat, 2021-06-05 at 21:42 +0530, Dwaipayan Ray wrote:
> > > > When checkpatch is run on file contents piped through stdin,
> > > > it may generate false EMBEDDED_FILENAME warnings if the
> > > > --file flag is used.
> > >
> > > I think this is a "don't do that" scenario and this change
> > > is not necessary.
> > >
> >
> > Okay then. I will drop this.
> > Sorry for the noise.
>
> I think you want something like this:
> ---
>  scripts/checkpatch.pl | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index dad87c3686326..582f8e07d32d5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -331,6 +331,7 @@ help(0) if ($help);
>
>  die "$P: --git cannot be used with --file or --fix\n" if ($git && ($file || $fix));
>  die "$P: --verbose cannot be used with --terse\n" if ($verbose && $terse);
> +die "$P: -f/--file requires at least one filename\n" if ($file && $#ARGV < 0);
>
>  if ($color =~ /^[01]$/) {
>         $color = !$color;
>

Yes, that's nice.
Most of the checks don't work with piped input when --file
is specified. So disabling it will avoid any confusion.

I can send in a patch if it's okay with you.

Thanks,
Dwaipayan.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ