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: <CALzav=fmkeE_QvasYTkzFrequ25ZVK97Um39JQc=s=xyoCnJtA@mail.gmail.com>
Date:   Tue, 27 Sep 2022 09:57:42 -0700
From:   David Matlack <dmatlack@...gle.com>
To:     Joe Perches <joe@...ches.com>
Cc:     LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] get_maintainer: Gracefully handle files with authors but
 no signers

On Thu, Sep 22, 2022 at 4:43 PM Joe Perches <joe@...ches.com> wrote:
>
> On Thu, 2022-09-22 at 16:01 -0700, David Matlack wrote:
> > Gracefully handle the case where a file has no signers (e.g. has not
> > been modified within the last year) but does have authors (e.g. because
> > there are local commits that modifies the file without Signed-off-by
> > tags). This scenario could happen for developers whose workflow is to
> > add Signed-off-by tags as part of git-format-patch rather than as part
> > of git-commit.
>
> I think that's a poor process.

I don't disagree, and personally I have changed my own workflow to add
sign-offs at commit time.

>
> > Today this scenario results in the following non-sensical output from
> > get_maintainer.pl:
> >
> >   Bad divisor in main::vcs_assign: 0
> >   "GitAuthor: David Matlack" <dmatlack@...gle.com> (authored:1/1=100%,added_lines:9/9=100%,removed_lines:3/3=100%)
>
> Interesting...
>
> > There are two issues with this output: the "Bad divisor" error and the
> > garbled author name. Both stem from this line in vcs_find_signers():
> >
> >   return (0, \@signatures, \@authors, \@stats) if !@...natures;
> []
> > Returning 0 for the number of commits and a non-empty list for the
> > authors results in the "Bad divisor". The garbled author name comes from
> > the fact that @authors is the raw, unparsed, output line from git-log.
> > Code later in vcs_find_signers() actually parses out the name and drops
> > the "GitAuthor: " prefix.
> >
> > Fix this by returning an empty list instead of @authors and @stats to
> > make them coherent with the fact that commits is 0.
> []
> > diff --git a/scripts/get_maintainer.pl b/scripts/get_maintainer.pl
> []
> > @@ -1605,7 +1605,7 @@ sub vcs_find_signers {
> >
> >  #    print("stats: <@stats>\n");
> >
> > -    return (0, \@signatures, \@authors, \@stats) if !@...natures;
> > +    return (0, (), (), ()) if !@...natures;
>
> There's probably some better mechanism, not sure what it is though
> as I don't have equivalent commits in the actual tree.
>
> And I think you need \() and not () as what's returned is a reference
> to an array and not an array or maybe use undef.

Ack, will do in v2.

>
> >      save_commits_by_author(@lines) if ($interactive);
> >      save_commits_by_signer(@lines) if ($interactive);
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ