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]
Message-ID: <CAMuHMdUp5U0nnp9LfWgY0VnkRppMVXZU9NSpWqcMKYM_zRXRuA@mail.gmail.com>
Date:   Sun, 18 Oct 2020 20:15:49 +0200
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Joe Perches <joe@...ches.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Andy Whitcroft <apw@...dowen.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] checkpatch: Allow not using -f with files that are in git

Hi Joe,

On Sun, Oct 18, 2020 at 6:07 PM Joe Perches <joe@...ches.com> wrote:
> On Sun, 2020-10-18 at 16:03 +0200, Geert Uytterhoeven wrote:
> > On Tue, Aug 25, 2020 at 2:12 AM Joe Perches <joe@...ches.com> wrote:
> > > If a file exists in git and checkpatch is used without the -f
> > > flag for scanning a file, then checkpatch will scan the file
> > > assuming it's a patch and emit:
> > >
> > > ERROR: Does not appear to be a unified-diff format patch
> > >
> > > Change the behavior to assume the -f flag if the file exists
> > > in git.
> > >
> > > Signed-off-by: Joe Perches <joe@...ches.com>
> >
> > Thanks for your patch!
> >
> > > --- a/scripts/checkpatch.pl
> > > +++ b/scripts/checkpatch.pl
> > > @@ -976,6 +976,16 @@ sub seed_camelcase_includes {
> > >         }
> > >  }
> > >
> > > +sub git_is_single_file {
> > > +       my ($filename) = @_;
> > > +
> > > +       return 0 if ((which("git") eq "") || !(-e "$gitroot"));
> > > +
> > > +       my $output = `${git_command} ls-files -- $filename`;
> > > +       my $count = $output =~ tr/\n//;
> > > +       return $count eq 1 && $output =~ m{^${filename}$};
> > > +}
> > > +
> > >  sub git_commit_info {
> > >         my ($commit, $id, $desc) = @_;
> > >
> >
> > This is now commit f5f613259f3fea81 ("checkpatch: allow not using -f
> > with files that are in git"), causing:
> >
> >     Global symbol "$gitroot" requires explicit package name (did you
> > forget to declare "my $gitroot"?) at scripts/checkpatch.pl line 980.
> >     Execution of scripts/checkpatch.pl aborted due to compilation errors.
> >
> > FWIW, host system is running Ubuntu 18.04.5 LTS (upgrade to 20.04 LTS
> > planned soon ;-).
>
> I believe there is a dependency on another patch
> in -next that wasn't pushed to Linus' tree.
>
> commit 5ec1f7de97b26a3fa364bbb31fdd2e42c8e6fa22
> Author: Joe Perches <joe@...ches.com>
> Date:   Thu Oct 8 11:53:44 2020 +1100
>
>     checkpatch: test $GIT_DIR changes
>
> So it'd be better to revert right now until
> this other patch is accepted or pushed.

Thanks, after cherry-picking that one from next, checkpatch works again.
However, there are some issues with that commit:
  1. ERROR: Missing Signed-off-by: line by nominal patch author 'Joe
Perches <joe@...ches.com>',
  2. The Link: is bogus, and gives 404.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ