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: <CABJPP5A0ZvbWH8rwR_YwF61ZBKGFef-kLBHKH5r5O=mLdiHZSA@mail.gmail.com>
Date:   Mon, 7 Jun 2021 11:23:13 +0530
From:   Dwaipayan Ray <dwaipayanray1@...il.com>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
Cc:     Joe Perches <joe@...ches.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch: do not allow using -f/--file option without a filename

On Mon, Jun 7, 2021 at 10:41 AM Lukas Bulwahn <lukas.bulwahn@...il.com> wrote:
>
> On Sat, Jun 5, 2021 at 9:32 PM Joe Perches <joe@...ches.com> wrote:
> >
> > On Sun, 2021-06-06 at 00:47 +0530, Dwaipayan Ray wrote:
> > > When checkpatch is run without a filename, it reads from stdin.
> > > But if --file option is used along with that, it may generate
>
> But if the --file option is used...
>
> > > false positives.
> > >
> > > Consider the following test file:
> > > $cat test.c
> > > int x = a - b;
> > >
> > > $cat test.c | ./scripts/checkpatch.pl -f
> > > WARNING: It's generally not useful to have the filename in the file
> > > +int x = a - b;
> > >
> > > This is a false positive and occurs because $realfile is set to "-".
> > > Also since checkpatch relies on the file's extension to run specific
> > > checks for c files, assembly files, etc, most of the checks are
> > > not run as well.
> > >
> > > So it is better to disable -f/--file option when checkpatch is
> > > run without a filename.
> >
> > That's a reasonable commit message, thanks.
> >
>
> That can be shortened to:
>
> Disable -f/--file option when checkpatch is run without a filename.
>
> How about adding a description in the checkpatch Documentation on this
> topic as well, as part of this patch?
>

I can also add it to the next batch of the documentation updates I am
working on. That can list all the flag combinations that's not
allowed. And we can let this patch go independently for now...

Thanks,
Dwaipayan.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ