|
|
Subscribe / Log in / New account

The many names of commit 55039832f98c

By Jonathan Corbet
January 16, 2025
The kernel is, on its face, a single large development project, but internally it is better viewed as 100 or so semi-independent projects all crammed into one big tent. Within those projects, there is a fair amount of latitude about how changes are managed, and some subsystems are using that freedom in the search for more efficient ways of working. In the end, though, all of these sub-projects have to work together and interface with kernel-wide efforts, including the stable-release and CVE-assignment processes. For some time, there has been friction between the direct rendering (DRM, or graphics) subsystem and the stable maintainers; that friction recently burst into view in a way that shows some of the limitations of how the kernel community manages patches.

One of the key rules for the stable releases is that every patch must first land in the mainline kernel before being considered for the stable trees. The rule exists to ensure that stable patches have had a bare minimum of wider exposure and testing, but also to ensure that no fixes fall through the cracks and miss the mainline entirely. Exceptions to this rule are rare, and usually involve urgent security fixes. In practice, this rule means that any patch proposed for the stable updates should include a line, in its changelog, providing the mainline commit ID for that patch.

On January 10, this patch to the Xe graphics driver, written by Umesh Nerlige Ramappa, was sent to the mailing list dedicated to potential stable-update patches. It duly included this line in its changelog:

    commit 55039832f98c7e05f1cf9e0d8c12b2490abd0f16 upstream

The only problem is that the commit named there does not, as of this writing, exist in the mainline kernel repository. It does exist in linux-next, and can be expected to land in the mainline during the 6.14 merge window. So this would appear to be a violation of the mainline-first rule — this fix is being proposed for the stable updates before it hits the mainline repository. So something strange is happening here. There is a clue to be found in another line in the patch as posted to the stable mailing list — but not in the version that appears in linux-next:

    (cherry picked from commit 55039832f98c7e05f1cf9e0d8c12b2490abd0f16)

This line can also be found in commit f0ed39830e60, which contains the same fix and is in the mainline; it landed there in time for the 6.13-rc6 prepatch. So the change, as posted to the stable list, is indeed a legitimate stable candidate, but figuring that out takes some extra work, and the upstream citation contained in its changelog must either be corrected, or it will forever refer to a commit that did not, in truth, fix the bug in the mainline.

This situation comes about as a result of the way the DRM subsystem organizes its maintainers. DRM is a large subsystem containing many drivers that are some of the largest components within the kernel. Just like maintaining the kernel in a single repository led to scalability problems many years ago, maintaining DRM that way would not work now. So the DRM subsystem is managed by way of a set of sub-subsystem trees that come together in the drm-next repository. A relatively large number of developers are empowered to commit to these repositories, with the result that the maintainership work is widely distributed.

So far so good; the place where the friction comes in is the DRM community's wide use of cherry-picking to move individual commits between repositories as needed. The commit in question had been given ID 55039832f98c on its way into the drm-next repository; that repository feeds into linux-next, so the commit appears there with that ID. At some point, it was identified as a fix that should go into 6.13 rather than waiting for the 6.14 merge window; that resulted in it being cherry-picked into a separate fixes branch as f0ed39830e60. The "cherry picked from" line was added automatically at that time. Later on, the commit was cherry-picked again into another branch for submission to the stable process, resulting in another line in the changelog:

    (cherry picked from commit f0ed39830e6064d62f9c5393505677a26569bb56)

This is the form in which it found its way to the stable maintainers, one of whom, Greg Kroah-Hartman, was not pleased. This profusion of IDs for a single commit, and the multiple appearances of a commit in the repositories, makes it difficult for the stable maintainers to make decisions about which commits should be backported or have CVE numbers assigned to them.

In response, Kroah-Hartman said:

I give up. You all need to stop it with the duplicated git commit ids all over the place. It's a major pain and hassle all the time and is something that NO OTHER subsystem does.

Yes, I know that DRM is special and unique and running at a zillion times faster with more maintainers than any other subsystem and really, it's bigger than the rest of the kernel combined, but hey, we ALL are a common project here. If each different subsystem decided to have their own crazy workflows like this, we'd be in a world of hurt.

Sometimes, the existence of multiple IDs can cause the fix for a bug to appear to be merged before the bug itself. For example, commit a6dd15981c03, merged for 6.12-rc7, claims to be a fix for commit c9b7c809b89f, which landed in 6.13-rc1. Kernel development moves quickly, but one would be hard put to say that it moves so quickly that, by way of relativistic effects, the causality between a bug and the patch that fixes it can appear to be violated. This sort of apparent inversion between cause and effect is not uncommon in the kernel's repository, and it can definitely lead to confusion.

Most subsystems commit short-term fixes to a separate branch from the outset, then push that branch to Linus Torvalds occasionally. If needed, the maintainers of that subsystem may also merge the fixes branch into their "next release" branch. When this process is followed, the fix will retain the same commit ID throughout, and the kinds of problems described here will not arise.

The DRM maintainers, though, have said clearly that they believe such a process cannot work at the scale seen in that subsystem. Dave Airlie suggested fixing the tools used to maintain the stable releases instead. Simona Vetter explained how things work from a graphic developer's point of view, pointing out that, for most of them, the mainline kernel is a distant downstream consumer of their work. The way a patch appears in drm-next, including its ID, tends to be more relevant; that is why a drm-next ID can be cited in a stable-candidate patch, even if that patch entered the mainline with a different ID.

Vetter said that most of the problems experienced by the stable maintainers can be solved by simply looking at all of the commit IDs found in the changelog, including the cherry-picked ones, when deciding whether a change has appeared in another tree (such as the mainline). Vetter added that: "We won't change our process, because I couldn't find the maintainer volunteers to make that happen", noting also: "This shit is easy, except somehow here we are almost a decade later".

Sasha Levin, another stable-release maintainer, pointed out that problems still remain, especially in cases where a commit ends up in the mainline more than once (which happens reasonably frequently in the DRM subsystem). "So no, this isn't a simple trace-the-cherry-pick-tags exercise". Vetter disagreed, though, providing a detailed description of how the chain of cherry-picking develops and concluding "sometimes you do have to do a bit more cherry-pick tracing than what you've done".

Perhaps what is really on display here is the limitations inherent in using a commit ID to identify a change; that ID is firmly tied to just how a commit lands in a specific branch. Some tools, such as Gerrit, place a separate "change ID" into each changelog to identify a change uniquely through both movements through repositories and revisions by the developer; the kernel community, though, has shown little interest in using change IDs and generally prohibits them from appearing in changelogs.

Toward the end of the conversation, Vetter posted "the generic algorithm" for locating commits in the various trees, acknowledging that: "It's a bit madness, but more importantly, it's scriptable madness". Kroah-Hartman agreed that it is "total madness", saying that it takes far too long to execute, but also seemed resigned to dealing with it. "I know DRM isn't the only offender here, many commits flow through multiple trees at the same time". He said he would work on a solution during the coming merge window. With luck, this work will help to bring an end to this long-running disagreement and reduce the impedance mismatches between different practices across the kernel community.

Index entries for this article
KernelDevelopment model/Stable tree


to post comments

Many names

Posted Jan 16, 2025 20:33 UTC (Thu) by willy (subscriber, #9762) [Link]

I know there's an allusion here, but I'm not sure what it is. My mind went to the Elementary episode "The Many Mouths of Aaron Colville", but I suspect that was an allusion to something else. I was also reminded of the Arthur C Clarke story "The Nine Billion Names of God", but that's not a good fit either.

tooling

Posted Jan 16, 2025 21:44 UTC (Thu) by bangert (subscriber, #28342) [Link]

so if the cherry-pick commit had additional metadata (not in the comment) referencing the original commit - and the subsequent second cherry-pick retained both references, then it could easily be found?

Issue IDs

Posted Jan 16, 2025 23:57 UTC (Thu) by ewen (subscriber, #4772) [Link] (21 responses)

The irony of trying to use the merkle tree hash of a single “central repo” as the way to identify an issue being fixed… in a distributed version control system :-/

Most other large projects long ago figured out they need (one or more) issue trackers, or some other “tracking ID” to be the link between issues discovered (and the cause of the issues), and their fixes. That gives a stable ID that can be cross referenced, and annotated with more information, without changing the unique ID number.

Here even a (sha256) hash of just the patch diff (not the tree) would be a better choice than an arbitrary merkle tree hash. If the kernel won’t follow modern industry best practice.

Ewen

Issue IDs

Posted Jan 17, 2025 8:57 UTC (Fri) by taladar (subscriber, #68407) [Link]

This is a good point, this is essentially an artifact of the email based workflows again.

Taking just the diff

Posted Jan 17, 2025 9:04 UTC (Fri) by epa (subscriber, #39769) [Link] (9 responses)

Maybe git needs the concept of a ‘disembodied commit’ which stores a diff. The SHA of the commit is the SHA of the text diff as you say. But such a commit has no ancestor. If the diff applies cleanly you can ‘merge’ the disembodied commit into your branch, creating a merge commit whose ancestors are the previous state of your branch and the disembodied commit. Unlike cherry-picking, this would keep the same SHA, making it easier to see which branches have received a fix.

Taking just the diff

Posted Jan 17, 2025 11:58 UTC (Fri) by TomH (subscriber, #56149) [Link] (6 responses)

It already has git patch-id which basically does exactly that and computes an ID for a patch. I believe the primary use currently is internal to identify when two commits are essentially the same and help avoid unnecessary conflicts.

Taking just the diff

Posted Jan 17, 2025 13:46 UTC (Fri) by epa (subscriber, #39769) [Link] (5 responses)

So I guess it needs better tooling so you can ask the question "has this patch gone into my branch" just as easily as "is this commit an ancestor of my branch".

Taking just the diff

Posted Jan 17, 2025 13:54 UTC (Fri) by geert (subscriber, #98403) [Link] (4 responses)

The former is much more resource-intensive than the latter.

Taking just the diff

Posted Jan 17, 2025 18:16 UTC (Fri) by k3ninho (subscriber, #50375) [Link] (2 responses)

Am I missing something? "Has this patch gone into my branch?" is "Are the changes in this patch in place?"

The diff has end-result line numbers and expected text, you can test "does this line match this patch?" pretty cheaply. If the line number doesn't match up, the unified diff gives you three lines to find so you can check after and before the three lines following. Maybe the lines get split up, but that's a case that a tool can't work out intent.

K3n.

Taking just the diff

Posted Jan 17, 2025 18:47 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

How do you deal with reverts or subsequent edits to the line?

Taking just the diff

Posted Jan 18, 2025 8:41 UTC (Sat) by epa (subscriber, #39769) [Link]

I was thinking that if you applied a given patch, but then made later changes that reverted it or rearranged or even deleted the code, it would still count as having “gone into” that branch. This is similar to checking whether a commit is an ancestor of your branch — it either is or isn’t, for all that later changes might have modified the effect of that commit.

Taking just the diff

Posted Jan 19, 2025 1:59 UTC (Sun) by Heretic_Blacksheep (guest, #169992) [Link]

I'd rather have a family tree that takes a little time to (automatically) trace across all possible branches than no family tree and no easy way to track changes at all. Computers are supposed to be there to do the work for humans with useful and accurate results, not increase manual cognitive load and time needed to sort through disparate not-quite-linked identifiers.

A single unique ancestral id assigned strictly to committed content in which all children and cousin ids including changes to the ancestor are hard linked is preferable to systems where there can be confusion generated as to when, if, and why content may or may not have been integrated into the target work. Effectively what's needed in the kernel is a system in which all changes have such a unique content ID that can be referenced regardless of the sub project. The current system really doesn't appear to work in all cases at the scale the kernel is working at. And the DRM groups need to stop thinking they're independent of "downstream" kernel, when that's obviously a fiction. They're as dependent on kernel features just as the kernel is dependent on their features.

Taking just the diff

Posted Jan 18, 2025 11:00 UTC (Sat) by em (subscriber, #91304) [Link] (1 responses)

It would still not work. When cherry-picking some adjustments are often needed, changing the hash of the changes.

Taking just the diff

Posted Jan 18, 2025 21:17 UTC (Sat) by epa (subscriber, #39769) [Link]

But that’s exactly what I am talking about. When you merge a branch and resolve conflicts, you can make any changes you want as part of the merge. You could even end up not applying any of the change ostensibly being merged in (perhaps because the affected feature and its source code no longer exist in your branch). But still git will show that you performed a merge and the other branch is now an ancestor of yours. And this is by design.

(Another way to see whether a branch has been merged would be to look at the code and check the changes in the other branch are present in yours. This is what people sometimes had to resort to in older version control systems without change tracking, or which were not distributed, or indeed if they had no VCS at all. Both approaches have their advantages, but often we prefer the cleaner one based on explicitly tracking commit history.)

Now moving from whole branches to individual changes. You could try to work out whether a cherry-pick has been applied by looking at the current state of the code, or going back over the branch history to see if a similar-looking diff has been applied in the past. But as you say that falls down if there were conflicts or for other reasons the patch wasn’t applied exactly.

Instead, I suggest a metadata-based approach where you can create a “disembodied commit” which has a patch to apply but no ancestor commits. Merging this commit into your branch is usually simpler than merging a whole other branch, which may have unrelated changes (unless your programmers are very disciplined about always creating “daggy fixes” where the commit fixing a bug is an immediate child of the one that introduced it). Indeed merging this disembodied commit is the same as cherry-picking it, as far as the code goes. But unlike cherry-picking, the disembodied commit keeps the same SHA, and is now an ancestor of your branch. That would make it easy to ask “has this fix been applied?” without having to match the file contents, and even when the fix is only given as a text diff against some slightly different version of the codebase.

The SHA of the disembodied commit could be the hash of the original set of changes (or textual diff) but that same SHA would still be used even if you had to resolve conflicts on merging. Again, just as happens for regular branches and regular merges.

Issue IDs

Posted Jan 17, 2025 10:59 UTC (Fri) by sima (subscriber, #160698) [Link] (4 responses)

Yup, the cherry-picked from annotations we dump into our cherry-picks in drm are essentially recreating such a stable ID out of thin air. It's not perfect, but it's definitely better than trying to guess by looking at patch title and diff, since as you cherry-pick fixes around especially the diff is rarely an exact match.

It still sucks for the teams that have large internal trees (like amd's display code is shared with windows and firmware), so we still have some discontinuity in tracking changes and bugs that's not reflected in the upstream git log accurately, so ideally the kernel would need to accept an opaque original commit identifier.

I don't think a bug tracker issue would necessary work, because if your initial bugfix is broken most teams just reopen the original issue. Whereas for CVE tracking upstream wants separate IDs, if that broken fix has shown up in any release tag already. So for that purpose tracking commits instead of issue IDs has some benefits too.

Issue IDs

Posted Jan 17, 2025 20:36 UTC (Fri) by ewen (subscriber, #4772) [Link] (3 responses)

Certainly if one were using an issue tracker to get “stable ID for fix commits”, that needed to be unique, there’d need to be some conventions around how to use the bug tracker to derive those stable IDs. Either “you must open a new issue, to get a new stable ID, and have it link back to the closed issue”. Or some kind of “fix sequence number” (eg ISSUEID-SEQ, with SEQ starting at 0 and increased for each attempt at “commits fixing problem”).

But I do agree with your general point that the “stable” kernel accepting an “opaque ID that can be searched for” is the key change required. Rather than a “merkle tree commit hash in exactly their upstream tree” (Linus release), which cannot be known in advance when a fix is made before (the thing being fixed) is “merged to the central repo”.

Ewen

Issue IDs

Posted Jan 17, 2025 22:50 UTC (Fri) by NYKevin (subscriber, #129325) [Link]

I think the average large org has a much more straightforward posture here: They have a single central repository (which might or might not be a DVCS like Git), and whatever identifier that centralized repo assigns is the identifier you use for everything.

Edge cases:

* If a commit has yet to make it into the central repo, then it has no ID, or perhaps only an unstable ID that might change or become invalid in the future. This does not matter, because these commits are considered "unfinished" and should not be used for any serious purpose (other than asking people to review them so that they can become final).
* Once a commit is in the central repo, history rewrites are forbidden (allowing for a few exceptional cases when some sensitive item gets improperly committed). The need to support that exceptional use case is one of the stronger arguments for using a non-DVCS system (which can simply assign numeric commit IDs by fiat rather than having to do this whole Merkle tree business, so you can rewrite history without changing subsequent IDs).
* When something is cherry picked, there is some notion of a "primary" or "original" commit, which will at the very least be mentioned in the commit message of the cherry pick. Good tooling can use this to resolve the original commit when given a cherry pick ID (not every org has good tooling).
* Linear history is usually enforced. When a commit becomes final, it is rebased on top of the intended branch. For some systems like Perforce, this is usually a trivial operation (Perforce's data model is that each individual file is a series of snapshots with associated numeric commit IDs, so all history is inherently linear, and "rebasing" just means "check to make sure that nobody else has edited any of the same files as us").

Obviously this would not work very well for Linux's use case, but it is the sort of thing that the MITRE people were probably expecting when they set some of these rules around stable IDs.

Issue IDs

Posted Jan 17, 2025 23:16 UTC (Fri) by kleptog (subscriber, #1183) [Link] (1 responses)

The patch tracking id doesn't need to be anything complicated. You could for example just generate a random 32 character hex string and store it in the commit message. Then it would automatically survive cherry-picks and everything. You can make a git hook that automatically generates such an id when the commit is created.

Of course, such a string without context is not very useful so we should prefix it with something, perhaps the capital letter I. That would make it easily recognisable and searchable.

Finally, it should not be bare, but it could be added to the commit message under Change-ID or some such.

Oops, now it looks like Gerrit changelog ID and we couldn't possibly do that...

All this talk of diff algorithms and automatic patch matching, the amount of cycles and discussion going in this, all to solve a problem that is trivially solved with a git hook. I don't understand it at all.

We can replace the I with a K and call it Kernel-Change-Id, maybe then people would accept it?

Issue IDs

Posted Jan 24, 2025 22:57 UTC (Fri) by marcH (subscriber, #57642) [Link]

> Oops, now it looks like Gerrit changelog ID and we couldn't possibly do that...

Of course not, because such a dead simple solution comes from lesser people who do not recognize the superiority of an email-based workflow. What were you thinking?

Also, Gerrit genuinely sucks in many ways, so absolutely nothing good can come from it and it must be entirely dismissed.

> All this talk of diff algorithms and automatic patch matching, the amount of cycles and discussion going in this, all to solve a problem that is trivially solved with a git hook. I don't understand it at all.

No one can understand it because it's not rational.

For more bad faith, don't forget to watch the seminal talk "Patches carved in stone tablets". It's a bit old (2016) but already well into the social media age where the universe is split between the "good guys" who do everything right and the "bad guys" who do everything wrong. A complex world made simple at last.

To be fairer and less bitter: DRM seems to _already_ use such a random ID! This random ID just happens to coincide with the SHA of a mutable git commit, with a "cherry-picked from:" prefix pretending that the ID is the SHA of an immutable git commit.

But this ID disguise and attempt to appease the stone tablets gods is backfiring; they have not been fooled...

Issue IDs

Posted Jan 17, 2025 17:01 UTC (Fri) by twmoure (subscriber, #58924) [Link]

The author metadata attached to the commit almost works the way a unique id should - it's preserved by cherry-picks, rebases, etc., and there's already existing flags for 'git commit' etc to say "reset author information" in the case where this default behavior isn't desired (where a commit is being split up, or rewritten to such a large extent that it's no longer the same commit, etc.). The only problem is it isn't actually a unique id, only a name/email/timestamp. But it seems like adding an actual unique id alongside those things that's managed in exactly the same way would be reasonably straightforward and consistent with git's overall design..

Issue IDs

Posted Jan 17, 2025 18:49 UTC (Fri) by mathstuf (subscriber, #69389) [Link] (1 responses)

> Here even a (sha256) hash of just the patch diff (not the tree) would be a better choice than an arbitrary merkle tree hash. If the kernel won’t follow modern industry best practice.

Hmm. I'm not so sure that would work either. There are different diff algorithms in git itself and one might have higher context settings for various reason (e.g., I believe Phabricator wanted "infinite" context for uploaded patches).

Issue IDs

Posted Jan 17, 2025 20:47 UTC (Fri) by ewen (subscriber, #4772) [Link]

If one were generating a diff for the purpose of computing a stable “change ID hash” then obviously the exact diff algorithm, formatting, and diff parameters would need to be fixed, along with the hash algorithm. To ensure it was reproducible over time and different runtime environments.

TomH pointed out elsewhere in the thread that there is an internal “git patch-id” already, in git, that might form the basis of a “hash of just the patch diff”, if the “stable” kernel could be persuaded to accept that as the ID. It’d probably require extra tooling / metadata support to store enough information to enable efficient lookup of commits by the stable “change ID hash” (eg each git tree, or user, storing a cache of “change ID hash” to “merkle tree hash” mapping for direct lookup).

Ewen

Issue IDs

Posted Jan 17, 2025 19:42 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

Could the `Message-Id` of the originating patch be used somehow? For non-email workflows, a link to an MR/PR may suffice as well.

Issue IDs

Posted Jan 22, 2025 21:34 UTC (Wed) by siddh (subscriber, #169663) [Link]

> Here even a (sha256) hash of just the patch diff (not the tree) would be a better choice than an arbitrary merkle tree hash.

It already exists, it's called git-patch-id.

The following commits have the same patch ID:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/...

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/...

Is it the same commit if it was cherry-picked?

Posted Jan 17, 2025 0:43 UTC (Fri) by ringerc (subscriber, #3071) [Link] (1 responses)

If I cherry-pick a commit or I merge a commit with conflicts that require manual resolution, is it the same commit anymore?

Given a chain of custody like:

* my-tree: 1234deadbeef
* some-other-tree: 9999aaaa with commit message containing "cherry-picked from 1234deadbeef"
* trusted-tree: 8888bbbb, which has 9999aaaa as an n-way merge ancestor

... I wouldn't personally consider that the presence of 9999aaaa in the trusted tree's history to mean that 1234deadbeef is really in that tree. Not unless it was trivially verifiable that it's an automatic merge with no manual resolutions.

Maybe I've misunderstood something.

Is it the same commit if it was cherry-picked?

Posted Jan 17, 2025 19:43 UTC (Fri) by mathstuf (subscriber, #69389) [Link]

> Not unless it was trivially verifiable that it's an automatic merge with no manual resolutions.

As far as Git's data model is concerned, merge conflict resolution is indistinguishable from "evil" merges (i.e., merges that also add unrelated edits). You can make these by `git commit --amend`ing a merge commit.

Cherry-pick metadata

Posted Jan 17, 2025 12:16 UTC (Fri) by Wol (subscriber, #4433) [Link]

Don't know how much metadata git stores with commits, but couldn't it store what sort of commit, such as merge, cherry-pick, whatever, and store the original associated ids as well? So regardless of whether it needed fixing up or whatever (which might have its own id), a cherry-pick would store where it came from. You'd probably want the option of both parent commit and ancestor commit. So if you cherry pick a "new" commit, you'd set both parent and ancestor to the previous commit id. If you then cherry-pick a commit that's already been cherry-picked, you only set parent.

That way, you can see instantly what the immediate ancestor of a cherry-pick is, but also what the original commit was. And if you need any archaeology you then just trace back up the parent tree, like you'd normally do ...

Cheers,
Wol

(Not) Merging fixes into next

Posted Jan 17, 2025 12:34 UTC (Fri) by geert (subscriber, #98403) [Link] (4 responses)

> If needed, the maintainers of that subsystem may also merge the fixes branch into their "next release" branch.

Not doing this regularly is my main gripe with drm-next.

When merging drm-next and other for-next trees into the latest upstream release, conflicts can be expected, because e.g. a common structure was changed in a different subsystem, or an API was changed, and a new user still expecting the old API popped up. However, in my experience, most of the time when merging drm-next, the conflict is not such an expected conflict, but a conflict with the DRM fixes that had just gone upstream.
Merging their own fixes branch into their own for-next branch before sending a fixes pull request would avoid such conflicts. In the absence of such a merge, every single person who wants to merge drm-next into the latest upstream release has to resolve these conflicts, and has to spend time investigating changes to drivers and/or a subsystem they may not be familiar with.
Fortunately (for me), Stephen Rothwell lives in an earlier time zone, so by the time I start creating a renesas-drivers release, he usually has already created a linux-next release, and thus has already resolved these conflicts himself ;-) Thanks Stephen!

(Not) Merging fixes into next

Posted Jan 17, 2025 20:38 UTC (Fri) by sima (subscriber, #160698) [Link] (3 responses)

This is another issue we've solved almost a decade ago with drm-tip: https://drm.pages.freedesktop.org/maintainer-tools/drm-ti... it both contains the merged tree of a pile of drm branches, and separate branches with fixups patches and git rerere solutions.

We've also imposed resolving new conflicts onto each individual committer (they tend to know best) and then everyone else just reuses the merge resolutions, which is why we're scaling to pretty ridiculous amounts of inter-tree conflicts.

At a ks years ago I think I was discussing with Stephen whether there's any interesting in sharing these in a standardized format, but there was no interest apparently.

(Not) Merging fixes into next

Posted Jan 19, 2025 10:29 UTC (Sun) by geert (subscriber, #98403) [Link] (2 responses)

> This is another issue we've solved almost a decade ago with drm-tip: https://drm.pages.freedesktop.org/maintainer-tools/drm-ti... it both contains the merged tree of a pile of drm branches, and separate branches with fixups patches and git rerere solutions.

Thanks a lot!

I had heard DRM committers have access to shared rerere-resolutions, but didn't know the details (and didn't find it appropriate to ask for DRM commit access just for that ;-) How do you make git consider that branch for resolutions? Is having it as a remote sufficiently, or do you need extra setup or magic? The drm-tip and dim documentation do not describe how it works (not using dim).

I didn't know about drm-tip.
Will give it a try for next renesas-drivers release.

> At a ks years ago I think I was discussing with Stephen whether there's any interesting in sharing these in a standardized format, but there was no interest apparently.

Not everybody is at the Kernel Summit. And even if they are, they might miss that session/information...

(Not) Merging fixes into next

Posted Jan 20, 2025 9:00 UTC (Mon) by sima (subscriber, #160698) [Link]

I think dim does some normalization of branch names (which git puts into the stored resolutions) in the rerere branch to make sure they transfer better. But we've had issues in the past where different git versions aren't entirely compatible due to changes in the merge and diff algorithms iirc. We put in minimal git version checks when we discovered these, but I think hasn't happened in years. So it's not perfect and needed some hacks to make it work reasonably well.

(Not) Merging fixes into next

Posted Jan 20, 2025 9:09 UTC (Mon) by sima (subscriber, #160698) [Link]

Oh and forgot to add for the setup, dim setup adjusts .git/rr-cache to be a symlink to a checkout of that branch for the git tree that does the drm-tip rebuilding.

On (not) being a role model

Posted Jan 19, 2025 14:14 UTC (Sun) by daenzer (subscriber, #7050) [Link] (1 responses)

Greg's behaviour in this saga wasn't great, to put it diplomatically.

First, he yelled at DRM developers about commit logs containing "cherry picked from commit <xyz>" references to commits which hadn't landed in Linus' tree yet. Since getting yelled at is no fun, some DRM devs stopped adding those references.

Now, Greg was complaining about not being able to tell whether or not a given DRM fix is already on a stable branch or needs to be backported there. It turns out that omitting information (per above) can make it harder to figure out things.

And once he finally understood the solution, he still complained about it being *hard*.

And all along, taking shots at DRM devs / accusing them of making his life hard, despite having the reasons explained to him many times.

I admire Sima for keeping her cool and calmly explaining things over and over, until the penny finally dropped.

On (not) being a role model

Posted Jan 20, 2025 11:30 UTC (Mon) by sima (subscriber, #160698) [Link]

Thanks a lot for the kudos and fully agreed, all that the shouting over the past years achieved is discourage folks from doing manual backports or otherwise interact with stable. Fingers crossed that we have the main issue now sorted and there's not too much else to sort out as secondary fallout.


Copyright © 2025, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds