ksummit.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Joel Fernandes <joelaf@google.com>,
	Barret Rhoden <brho@google.com>,
	ksummit <ksummit-discuss@lists.linuxfoundation.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jonathan Nieder <jrn@google.com>,
	Tomasz Figa <tfiga@chromium.org>,
	Han-Wen Nienhuys <hanwen@google.com>,
	Theodore Tso <tytso@google.com>,
	David Rientjes <rientjes@google.com>,
	Dmitry Torokhov <dtor@chromium.org>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [Ksummit-discuss] Allowing something Change-Id (or something like it) in kernel commits
Date: Tue, 27 Aug 2019 11:50:27 -0700	[thread overview]
Message-ID: <20190827185027.GA15384@roeck-us.net> (raw)
In-Reply-To: <CAMuHMdWFh2cK_T3y=iAfEOq=Nv_JpbKKqJ2chi=X40cWLxqBgA@mail.gmail.com>

On Tue, Aug 27, 2019 at 07:34:45PM +0200, Geert Uytterhoeven wrote:
> Hi Günter,
> 
> On Tue, Aug 27, 2019 at 4:01 PM Guenter Roeck <linux@roeck-us.net> wrote:
> > On 8/27/19 6:48 AM, Greg Kroah-Hartman wrote:
> > > On Tue, Aug 27, 2019 at 06:24:36AM -0700, Dmitry Vyukov wrote:
> > >> On Mon, Aug 26, 2019 at 11:06 PM Thomas Gleixner <tglx@linutronix.de> wrote:
> > >>> On Mon, 26 Aug 2019, Dmitry Vyukov wrote:
> > >>>> A somewhat related point re UUID/Change-ID.
> > >>>> For syzbot (or any other bug tracking system) we want to associate
> > >>>> bugs with fixes. It turned out there is no good identity of a change
> > >>>> that we could use. Commit hash is an obvious first thing to consider,
> > >>>> but (1) it changes in linux-next, (2) sometimes the change is not
> > >>>> committed yet when we do the association, (3) it is different when
> > >>>> backported to LTS (so not possible to say if a fix is in that stable
> > >>>> tree or not).
> > >>>> We decided to use commit subject, which works to some degree, but also
> > >>>> has problems: (1) not necessary unique, (2) sometimes people change
> > >>>> subject during backporting (e.g. prepend some prefix), (3) has all the
> > >>>> same problems of email clients messing with text (e.g. I can't issue
> > >>>> #syz fix command for loo long commit subjects with my email client).
> > >>>> Some real UUID/Change-ID would solve all of these problems by giving
> > >>>> us capability to refer to changes rather than a commit in a particular
> > >>>> tree only.
> > >>>
> > >>> If we adopt the Link: ..../$MSG tag widely then you have a UUID.
> > >>
> > >> Is there a way to ensure that everybody will generate right IDs
> > >> (ChangeID-Version) and then a link in canonical form will be included
> > >> into commit? As far as I understand this is not possible with the
> > >> current kernel tooling, as this aspect is not under control of any
> > >> unified tooling.
> > >> I see different maintainers use links to different archive web sites.
> > >> Also sometimes Link is present for other reasons (e.g. link to bug
> > >> report).
> > >> The link will need to be added by every developer (rather than
> > >> maintainer) so that it's available before the change is committed
> > >> anywhere.
> > >
> > > For subsystems I maintain, I am already adding the Link: tag to
> > > lore.kernel.org with the message id in it.  That is automatically added
> > > by my scripts.
> > >
> > >> Though, most of these are problems for any other change identification scheme...
> > >
> > > Note, we have 4000+ developers every year, it's hard enough to get them
> > > all to agree on major things, let alone crazy stuff like this :)
> > >
> >
> > Is it really that crazy ?
> >
> > I have to use a combination of subject analysis and patch content analysis
> > using fuzzy text / string comparison, combined with an analysis of the patch
> > description, to answer a simple question: Is this patch upstream, and what is
> > its upstream SHA ? Having a UUID tag would make this a simple and
> 
> I typically use "git cherry -v" to check if a patch is upstream.
> Yes, this may miss a patch that was changed.  But that can be a good thing.
> 

I use that as well, as "first line of defense". But it doesn't always work,
for example if a patch was applied to a downstream branch while its 
upstream review was still going on, or for backports which required
conflict resolutions or context changes.

> > straightforward operation. What is crazy is having to do all this analysis.
> 
> What happens to the UUID when a patch is split in two parts?
> If a part is applied with the same UUID, that would give the false impression
> that the original full patch was applied.
> 

Presumably one would/should drop the original UUID in such a situation.
One should also not blindly trust a uuid and also perform an automated
and/or manual review. The key would be to have the ability to identify
a patch without having to search through all of them.

In practice, I use a fuzzy match on the patch subject today, followed
by another fuzzy match on the patch content. Both are expensive, even
with parallel search, especially if one has to search through 100k+
patches. The subject match is also error prone - a computer has a
diffferent opinion about "match" than the human brain, and a seemingly
innocent subject change may result in a complete mismatch. Also, yes,
there may be multiple patches with the same or almost the same subject.
The ability to replace or at least augment that part of the search
with a uuid match would be extremely helpful.

> At least rebasing (using git rebase) your submissions against upstream will
> keep the part that still hasn't been applied.
> 

Unfortunately, a straight rebase doesn't work for a number of reasons.
In a nutshell we have too many local patches to deal with, in too many
areas of the kernel. Also, the deviation from upstream is in almost all
cases not what we want or need if a downstream patch differs from its
upstream version. We have to use a more intelligent (guided) approach.

Guenter

  reply	other threads:[~2019-08-27 18:50 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-22 23:39 [Ksummit-discuss] Allowing something Change-Id (or something like it) in kernel commits Doug Anderson
2019-08-23  0:03 ` Brendan Higgins
2019-08-23  0:17 ` Linus Torvalds
2019-08-23  0:30   ` Olof Johansson
2019-08-23  0:43     ` Guenter Roeck
2019-08-23  0:45       ` Olof Johansson
2019-08-23  1:05         ` Olof Johansson
2019-08-23  1:09           ` Dmitry Torokhov
2019-08-23  1:36         ` Theodore Y. Ts'o
2019-08-23  2:58           ` Linus Torvalds
2019-08-23  3:03             ` Linus Torvalds
2019-08-23 13:15               ` Sean Paul
2019-08-23 15:18                 ` Theodore Y. Ts'o
2019-08-23 15:31                   ` Sean Paul
2019-08-23 15:48                     ` Thomas Gleixner
2019-08-23 16:19                       ` Dmitry Torokhov
2019-08-23 16:35                         ` Joel Fernandes
2019-08-23 16:45                           ` Doug Anderson
2019-08-23 16:54                             ` Joel Fernandes
2019-08-23 18:00                               ` Doug Anderson
2019-08-23 19:08                                 ` Joel Fernandes
2019-08-23 19:15                                   ` Joel Fernandes
2019-08-23 19:23                                     ` Thomas Gleixner
2019-08-23 19:31                                       ` Joel Fernandes
2019-08-24 16:53                                   ` Doug Anderson
2019-08-23 16:46                           ` Dmitry Torokhov
2019-08-23 19:17                             ` Thomas Gleixner
2019-08-23 19:38                               ` Laurent Pinchart
2019-08-23 21:15                                 ` Thomas Gleixner
2019-08-23 21:25                                   ` Mark Brown
2019-08-24 23:13                                   ` Theodore Y. Ts'o
2019-08-25  7:09                                     ` Thomas Gleixner
2019-08-26 22:05                                       ` Thomas Gleixner
2019-08-28  8:50                                         ` Thomas Gleixner
2019-08-23 20:02                               ` Christian Brauner
2019-08-24 16:34                                 ` Doug Anderson
2019-08-24 18:11                                   ` Linus Torvalds
2019-08-24 23:04                                     ` Theodore Y. Ts'o
2019-08-25  3:11                                       ` Greg Kroah-Hartman
2019-08-27 10:51                                         ` Mark Brown
2019-09-09  8:14                                           ` Michael Ellerman
2019-09-09 12:09                                             ` Mark Brown
2019-08-26 17:13                                     ` Doug Anderson
2019-08-26 17:30                                       ` Joel Fernandes
2019-08-26 21:35                                         ` Doug Anderson
2019-08-26 21:51                                           ` Thomas Gleixner
2019-08-26 22:06                                             ` Doug Anderson
2019-08-26 22:19                                               ` Thomas Gleixner
2019-08-26 23:02                                           ` Theodore Y. Ts'o
2019-08-26 23:11                                             ` Doug Anderson
2019-09-16 14:11                                               ` Christian Brauner
2019-09-16 17:43                                               ` Al Viro
2019-09-16 18:05                                                 ` Doug Anderson
2019-08-26 23:43                                             ` Thomas Gleixner
2019-08-28 12:34                                               ` Christian Brauner
2019-08-27  0:29                                             ` Dmitry Vyukov
2019-08-27  6:06                                               ` Thomas Gleixner
2019-08-27 13:24                                                 ` Dmitry Vyukov
2019-08-27 13:48                                                   ` Greg Kroah-Hartman
2019-08-27 14:01                                                     ` Guenter Roeck
2019-08-27 14:09                                                       ` Thomas Gleixner
2019-08-27 15:33                                                         ` Greg Kroah-Hartman
2019-08-27 15:42                                                           ` Thomas Gleixner
2019-08-27 18:55                                                           ` Konstantin Ryabitsev
2019-08-27 19:53                                                             ` Greg Kroah-Hartman
2019-08-27 21:34                                                               ` Joel Fernandes
2019-08-27 21:38                                                                 ` Joel Fernandes
2019-08-28  9:08                                                                 ` Greg Kroah-Hartman
2019-08-28  9:25                                                                   ` Jani Nikula
2019-08-28 10:04                                                                   ` Martin K. Petersen
2019-08-28 10:53                                                                     ` Thomas Gleixner
2019-08-28 12:46                                                                       ` Martin K. Petersen
2019-08-28 10:42                                                                   ` Mark Brown
2019-08-28 11:41                                                                     ` Greg Kroah-Hartman
2019-08-28 12:22                                                                   ` Christian Brauner
2019-08-28 12:38                                                                   ` Joel Fernandes
2019-08-28 13:58                                                                     ` Theodore Y. Ts'o
2019-08-28 20:39                                                                       ` Doug Anderson
2019-08-28 20:46                                                                         ` Johannes Berg
2019-08-28 21:00                                                                           ` Doug Anderson
2019-08-28 22:15                                                                         ` Rob Herring
2019-08-27 17:34                                                       ` Geert Uytterhoeven
2019-08-27 18:50                                                         ` Guenter Roeck [this message]
2019-08-27 14:06                                                   ` Thomas Gleixner
2019-08-27  7:33                                               ` Geert Uytterhoeven
2019-08-27 13:30                                                 ` Dmitry Vyukov
2019-08-27 14:28                                                   ` Paul E. McKenney
2019-08-27 15:06                                                     ` Thomas Gleixner
2019-08-27 15:25                                                       ` Paul E. McKenney
2019-08-28  8:57                                                         ` Dan Carpenter
2019-08-23 15:49                     ` Doug Anderson
2019-08-23 15:54                       ` Thomas Gleixner
2019-08-23 15:59                         ` Thomas Gleixner
2019-08-23 16:38                           ` Doug Anderson
2019-08-23 16:50                             ` Andrew Lunn
2019-08-23 17:50                               ` Doug Anderson
2019-08-23 18:10               ` Konstantin Ryabitsev
2019-08-26 22:19               ` Paul Mackerras
2019-08-27  7:02                 ` Stephen Rothwell
2019-08-23  9:09             ` Vlastimil Babka
2019-08-23 12:48               ` Bhaskar Chowdhury
2019-08-23  1:01   ` Dmitry Torokhov
2019-08-23  1:07   ` Doug Anderson
2019-08-23  1:18     ` Joel Fernandes
2019-09-05  8:12 ` Eric Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190827185027.GA15384@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=brho@google.com \
    --cc=dtor@chromium.org \
    --cc=dvyukov@google.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hanwen@google.com \
    --cc=joelaf@google.com \
    --cc=jrn@google.com \
    --cc=ksummit-discuss@lists.linuxfoundation.org \
    --cc=rientjes@google.com \
    --cc=tfiga@chromium.org \
    --cc=tytso@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).