brintos

brintos / linux-shallow public Read only

0
0
Text · 36.8 KiB · 1f5ab49 Raw
797 lines · plain
1.. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0)2.. See the bottom of this file for additional redistribution information.3 4Handling regressions5++++++++++++++++++++6 7*We don't cause regressions* -- this document describes what this "first rule of8Linux kernel development" means in practice for developers. It complements9Documentation/admin-guide/reporting-regressions.rst, which covers the topic from a10user's point of view; if you never read that text, go and at least skim over it11before continuing here.12 13The important bits (aka "The TL;DR")14====================================15 16#. Ensure subscribers of the `regression mailing list <https://lore.kernel.org/regressions/>`_17   (regressions@lists.linux.dev) quickly become aware of any new regression18   report:19 20    * When receiving a mailed report that did not CC the list, bring it into the21      loop by immediately sending at least a brief "Reply-all" with the list22      CCed.23 24    * Forward or bounce any reports submitted in bug trackers to the list.25 26#. Make the Linux kernel regression tracking bot "regzbot" track the issue (this27   is optional, but recommended):28 29    * For mailed reports, check if the reporter included a line like ``#regzbot30      introduced: v5.13..v5.14-rc1``. If not, send a reply (with the regressions31      list in CC) containing a paragraph like the following, which tells regzbot32      when the issue started to happen::33 34       #regzbot ^introduced: 1f2e3d4c5b6a35 36    * When forwarding reports from a bug tracker to the regressions list (see37      above), include a paragraph like the following::38 39       #regzbot introduced: v5.13..v5.14-rc140       #regzbot from: Some N. Ice Human <some.human@example.com>41       #regzbot monitor: http://some.bugtracker.example.com/ticket?id=12345678942 43#. When submitting fixes for regressions, add "Closes:" tags to the patch44   description pointing to all places where the issue was reported, as45   mandated by Documentation/process/submitting-patches.rst and46   :ref:`Documentation/process/5.Posting.rst <development_posting>`. If you are47   only fixing part of the issue that caused the regression, you may use48   "Link:" tags instead. regzbot currently makes no distinction between the49   two.50 51#. Try to fix regressions quickly once the culprit has been identified; fixes52   for most regressions should be merged within two weeks, but some need to be53   resolved within two or three days.54 55 56All the details on Linux kernel regressions relevant for developers57===================================================================58 59 60The important basics in more detail61-----------------------------------62 63 64What to do when receiving regression reports65~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~66 67Ensure the Linux kernel's regression tracker and others subscribers of the68`regression mailing list <https://lore.kernel.org/regressions/>`_69(regressions@lists.linux.dev) become aware of any newly reported regression:70 71 * When you receive a report by mail that did not CC the list, immediately bring72   it into the loop by sending at least a brief "Reply-all" with the list CCed;73   try to ensure it gets CCed again in case you reply to a reply that omitted74   the list.75 76 * If a report submitted in a bug tracker hits your Inbox, forward or bounce it77   to the list. Consider checking the list archives beforehand, if the reporter78   already forwarded the report as instructed by79   Documentation/admin-guide/reporting-issues.rst.80 81When doing either, consider making the Linux kernel regression tracking bot82"regzbot" immediately start tracking the issue:83 84 * For mailed reports, check if the reporter included a "regzbot command" like85   ``#regzbot introduced: 1f2e3d4c5b6a``. If not, send a reply (with the86   regressions list in CC) with a paragraph like the following:::87 88       #regzbot ^introduced: v5.13..v5.14-rc189 90   This tells regzbot the version range in which the issue started to happen;91   you can specify a range using commit-ids as well or state a single commit-id92   in case the reporter bisected the culprit.93 94   Note the caret (^) before the "introduced": it tells regzbot to treat the95   parent mail (the one you reply to) as the initial report for the regression96   you want to see tracked; that's important, as regzbot will later look out97   for patches with "Closes:" tags pointing to the report in the archives on98   lore.kernel.org.99 100 * When forwarding a regression reported to a bug tracker, include a paragraph101   with these regzbot commands::102 103       #regzbot introduced: 1f2e3d4c5b6a104       #regzbot from: Some N. Ice Human <some.human@example.com>105       #regzbot monitor: http://some.bugtracker.example.com/ticket?id=123456789106 107   Regzbot will then automatically associate patches with the report that108   contain "Closes:" tags pointing to your mail or the mentioned ticket.109 110What's important when fixing regressions111~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~112 113You don't need to do anything special when submitting fixes for regression, just114remember to do what Documentation/process/submitting-patches.rst,115:ref:`Documentation/process/5.Posting.rst <development_posting>`, and116Documentation/process/stable-kernel-rules.rst already explain in more detail:117 118 * Point to all places where the issue was reported using "Closes:" tags::119 120       Closes: https://lore.kernel.org/r/30th.anniversary.repost@klaava.Helsinki.FI/121       Closes: https://bugzilla.kernel.org/show_bug.cgi?id=1234567890122 123   If you are only fixing part of the issue, you may use "Link:" instead as124   described in the first document mentioned above. regzbot currently treats125   both of these equivalently and considers the linked reports as resolved.126 127 * Add a "Fixes:" tag to specify the commit causing the regression.128 129 * If the culprit was merged in an earlier development cycle, explicitly mark130   the fix for backporting using the ``Cc: stable@vger.kernel.org`` tag.131 132All this is expected from you and important when it comes to regression, as133these tags are of great value for everyone (you included) that might be looking134into the issue weeks, months, or years later. These tags are also crucial for135tools and scripts used by other kernel developers or Linux distributions; one of136these tools is regzbot, which heavily relies on the "Closes:" tags to associate137reports for regression with changes resolving them.138 139Expectations and best practices for fixing regressions140~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~141 142As a Linux kernel developer, you are expected to give your best to prevent143situations where a regression caused by a recent change of yours leaves users144only these options:145 146 * Run a kernel with a regression that impacts usage.147 148 * Switch to an older or newer kernel series.149 150 * Continue running an outdated and thus potentially insecure kernel for more151   than three weeks after the regression's culprit was identified. Ideally it152   should be less than two. And it ought to be just a few days, if the issue is153   severe or affects many users -- either in general or in prevalent154   environments.155 156How to realize that in practice depends on various factors. Use the following157rules of thumb as a guide.158 159In general:160 161 * Prioritize work on regressions over all other Linux kernel work, unless the162   latter concerns a severe issue (e.g. acute security vulnerability, data loss,163   bricked hardware, ...).164 165 * Expedite fixing mainline regressions that recently made it into a proper166   mainline, stable, or longterm release (either directly or via backport).167 168 * Do not consider regressions from the current cycle as something that can wait169   till the end of the cycle, as the issue might discourage or prevent users and170   CI systems from testing mainline now or generally.171 172 * Work with the required care to avoid additional or bigger damage, even if173   resolving an issue then might take longer than outlined below.174 175On timing once the culprit of a regression is known:176 177 * Aim to mainline a fix within two or three days, if the issue is severe or178   bothering many users -- either in general or in prevalent conditions like a179   particular hardware environment, distribution, or stable/longterm series.180 181 * Aim to mainline a fix by Sunday after the next, if the culprit made it182   into a recent mainline, stable, or longterm release (either directly or via183   backport); if the culprit became known early during a week and is simple to184   resolve, try to mainline the fix within the same week.185 186 * For other regressions, aim to mainline fixes before the hindmost Sunday187   within the next three weeks. One or two Sundays later are acceptable, if the188   regression is something people can live with easily for a while -- like a189   mild performance regression.190 191 * It's strongly discouraged to delay mainlining regression fixes till the next192   merge window, except when the fix is extraordinarily risky or when the193   culprit was mainlined more than a year ago.194 195On procedure:196 197 * Always consider reverting the culprit, as it's often the quickest and least198   dangerous way to fix a regression. Don't worry about mainlining a fixed199   variant later: that should be straight-forward, as most of the code went200   through review once already.201 202 * Try to resolve any regressions introduced in mainline during the past203   twelve months before the current development cycle ends: Linus wants such204   regressions to be handled like those from the current cycle, unless fixing205   bears unusual risks.206 207 * Consider CCing Linus on discussions or patch review, if a regression seems208   tangly. Do the same in precarious or urgent cases -- especially if the209   subsystem maintainer might be unavailable. Also CC the stable team, when you210   know such a regression made it into a mainline, stable, or longterm release.211 212 * For urgent regressions, consider asking Linus to pick up the fix straight213   from the mailing list: he is totally fine with that for uncontroversial214   fixes. Ideally though such requests should happen in accordance with the215   subsystem maintainers or come directly from them.216 217 * In case you are unsure if a fix is worth the risk applying just days before218   a new mainline release, send Linus a mail with the usual lists and people in219   CC; in it, summarize the situation while asking him to consider picking up220   the fix straight from the list. He then himself can make the call and when221   needed even postpone the release. Such requests again should ideally happen222   in accordance with the subsystem maintainers or come directly from them.223 224Regarding stable and longterm kernels:225 226 * You are free to leave regressions to the stable team, if they at no point in227   time occurred with mainline or were fixed there already.228 229 * If a regression made it into a proper mainline release during the past230   twelve months, ensure to tag the fix with "Cc: stable@vger.kernel.org", as a231   "Fixes:" tag alone does not guarantee a backport. Please add the same tag,232   in case you know the culprit was backported to stable or longterm kernels.233 234 * When receiving reports about regressions in recent stable or longterm kernel235   series, please evaluate at least briefly if the issue might happen in current236   mainline as well -- and if that seems likely, take hold of the report. If in237   doubt, ask the reporter to check mainline.238 239 * Whenever you want to swiftly resolve a regression that recently also made it240   into a proper mainline, stable, or longterm release, fix it quickly in241   mainline; when appropriate thus involve Linus to fast-track the fix (see242   above). That's because the stable team normally does neither revert nor fix243   any changes that cause the same problems in mainline.244 245 * In case of urgent regression fixes you might want to ensure prompt246   backporting by dropping the stable team a note once the fix was mainlined;247   this is especially advisable during merge windows and shortly thereafter, as248   the fix otherwise might land at the end of a huge patch queue.249 250On patch flow:251 252 * Developers, when trying to reach the time periods mentioned above, remember253   to account for the time it takes to get fixes tested, reviewed, and merged by254   Linus, ideally with them being in linux-next at least briefly. Hence, if a255   fix is urgent, make it obvious to ensure others handle it appropriately.256 257 * Reviewers, you are kindly asked to assist developers in reaching the time258   periods mentioned above by reviewing regression fixes in a timely manner.259 260 * Subsystem maintainers, you likewise are encouraged to expedite the handling261   of regression fixes. Thus evaluate if skipping linux-next is an option for262   the particular fix. Also consider sending git pull requests more often than263   usual when needed. And try to avoid holding onto regression fixes over264   weekends -- especially when the fix is marked for backporting.265 266 267More aspects regarding regressions developers should be aware of268----------------------------------------------------------------269 270 271How to deal with changes where a risk of regression is known272~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~273 274Evaluate how big the risk of regressions is, for example by performing a code275search in Linux distributions and Git forges. Also consider asking other276developers or projects likely to be affected to evaluate or even test the277proposed change; if problems surface, maybe some solution acceptable for all278can be found.279 280If the risk of regressions in the end seems to be relatively small, go ahead281with the change, but let all involved parties know about the risk. Hence, make282sure your patch description makes this aspect obvious. Once the change is283merged, tell the Linux kernel's regression tracker and the regressions mailing284list about the risk, so everyone has the change on the radar in case reports285trickle in. Depending on the risk, you also might want to ask the subsystem286maintainer to mention the issue in his mainline pull request.287 288What else is there to known about regressions?289~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~290 291Check out Documentation/admin-guide/reporting-regressions.rst, it covers a lot292of other aspects you want might want to be aware of:293 294 * the purpose of the "no regressions" rule295 296 * what issues actually qualify as regression297 298 * who's in charge for finding the root cause of a regression299 300 * how to handle tricky situations, e.g. when a regression is caused by a301   security fix or when fixing a regression might cause another one302 303Whom to ask for advice when it comes to regressions304~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~305 306Send a mail to the regressions mailing list (regressions@lists.linux.dev) while307CCing the Linux kernel's regression tracker (regressions@leemhuis.info); if the308issue might better be dealt with in private, feel free to omit the list.309 310 311More about regression tracking and regzbot312------------------------------------------313 314 315Why the Linux kernel has a regression tracker, and why is regzbot used?316~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~317 318Rules like "no regressions" need someone to ensure they are followed, otherwise319they are broken either accidentally or on purpose. History has shown this to be320true for the Linux kernel as well. That's why Thorsten Leemhuis volunteered to321keep an eye on things as the Linux kernel's regression tracker, who's322occasionally helped by other people. Neither of them are paid to do this,323that's why regression tracking is done on a best effort basis.324 325Earlier attempts to manually track regressions have shown it's an exhausting and326frustrating work, which is why they were abandoned after a while. To prevent327this from happening again, Thorsten developed regzbot to facilitate the work,328with the long term goal to automate regression tracking as much as possible for329everyone involved.330 331How does regression tracking work with regzbot?332~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~333 334The bot watches for replies to reports of tracked regressions. Additionally,335it's looking out for posted or committed patches referencing such reports336with "Closes:" tags; replies to such patch postings are tracked as well.337Combined this data provides good insights into the current state of the fixing338process.339 340Regzbot tries to do its job with as little overhead as possible for both341reporters and developers. In fact, only reporters are burdened with an extra342duty: they need to tell regzbot about the regression report using the ``#regzbot343introduced`` command outlined above; if they don't do that, someone else can344take care of that using ``#regzbot ^introduced``.345 346For developers there normally is no extra work involved, they just need to make347sure to do something that was expected long before regzbot came to light: add348links to the patch description pointing to all reports about the issue fixed.349 350Do I have to use regzbot?351~~~~~~~~~~~~~~~~~~~~~~~~~352 353It's in the interest of everyone if you do, as kernel maintainers like Linus354Torvalds partly rely on regzbot's tracking in their work -- for example when355deciding to release a new version or extend the development phase. For this they356need to be aware of all unfixed regression; to do that, Linus is known to look357into the weekly reports sent by regzbot.358 359Do I have to tell regzbot about every regression I stumble upon?360~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~361 362Ideally yes: we are all humans and easily forget problems when something more363important unexpectedly comes up -- for example a bigger problem in the Linux364kernel or something in real life that's keeping us away from keyboards for a365while. Hence, it's best to tell regzbot about every regression, except when you366immediately write a fix and commit it to a tree regularly merged to the affected367kernel series.368 369How to see which regressions regzbot tracks currently?370~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~371 372Check `regzbot's web-interface <https://linux-regtracking.leemhuis.info/regzbot/>`_373for the latest info; alternatively, `search for the latest regression report374<https://lore.kernel.org/lkml/?q=%22Linux+regressions+report%22+f%3Aregzbot>`_,375which regzbot normally sends out once a week on Sunday evening (UTC), which is a376few hours before Linus usually publishes new (pre-)releases.377 378What places is regzbot monitoring?379~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~380 381Regzbot is watching the most important Linux mailing lists as well as the git382repositories of linux-next, mainline, and stable/longterm.383 384What kind of issues are supposed to be tracked by regzbot?385~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~386 387The bot is meant to track regressions, hence please don't involve regzbot for388regular issues. But it's okay for the Linux kernel's regression tracker if you389use regzbot to track severe issues, like reports about hangs, corrupted data,390or internal errors (Panic, Oops, BUG(), warning, ...).391 392Can I add regressions found by CI systems to regzbot's tracking?393~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~394 395Feel free to do so, if the particular regression likely has impact on practical396use cases and thus might be noticed by users; hence, please don't involve397regzbot for theoretical regressions unlikely to show themselves in real world398usage.399 400How to interact with regzbot?401~~~~~~~~~~~~~~~~~~~~~~~~~~~~~402 403By using a 'regzbot command' in a direct or indirect reply to the mail with the404regression report. These commands need to be in their own paragraph (IOW: they405need to be separated from the rest of the mail using blank lines).406 407One such command is ``#regzbot introduced: <version or commit>``, which makes408regzbot consider your mail as a regressions report added to the tracking, as409already described above; ``#regzbot ^introduced: <version or commit>`` is another410such command, which makes regzbot consider the parent mail as a report for a411regression which it starts to track.412 413Once one of those two commands has been utilized, other regzbot commands can be414used in direct or indirect replies to the report. You can write them below one415of the `introduced` commands or in replies to the mail that used one of them416or itself is a reply to that mail:417 418 * Set or update the title::419 420       #regzbot title: foo421 422 * Monitor a discussion or bugzilla.kernel.org ticket where additions aspects of423   the issue or a fix are discussed -- for example the posting of a patch fixing424   the regression::425 426       #regzbot monitor: https://lore.kernel.org/all/30th.anniversary.repost@klaava.Helsinki.FI/427 428   Monitoring only works for lore.kernel.org and bugzilla.kernel.org; regzbot429   will consider all messages in that thread or ticket as related to the fixing430   process.431 432 * Point to a place with further details of interest, like a mailing list post433   or a ticket in a bug tracker that are slightly related, but about a different434   topic::435 436       #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=123456789437 438 * Mark a regression as fixed by a commit that is heading upstream or already439   landed::440 441       #regzbot fix: 1f2e3d4c5d442 443 * Mark a regression as a duplicate of another one already tracked by regzbot::444 445       #regzbot dup-of: https://lore.kernel.org/all/30th.anniversary.repost@klaava.Helsinki.FI/446 447 * Mark a regression as invalid::448 449       #regzbot invalid: wasn't a regression, problem has always existed450 451Is there more to tell about regzbot and its commands?452~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~453 454More detailed and up-to-date information about the Linux455kernel's regression tracking bot can be found on its456`project page <https://gitlab.com/knurd42/regzbot>`_, which among others457contains a `getting started guide <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md>`_458and `reference documentation <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md>`_459which both cover more details than the above section.460 461Quotes from Linus about regression462----------------------------------463 464Find below a few real life examples of how Linus Torvalds expects regressions to465be handled:466 467 * From `2017-10-26 (1/2)468   <https://lore.kernel.org/lkml/CA+55aFwiiQYJ+YoLKCXjN_beDVfu38mg=Ggg5LFOcqHE8Qi7Zw@mail.gmail.com/>`_::469 470       If you break existing user space setups THAT IS A REGRESSION.471 472       It's not ok to say "but we'll fix the user space setup".473 474       Really. NOT OK.475 476       [...]477 478       The first rule is:479 480        - we don't cause regressions481 482       and the corollary is that when regressions *do* occur, we admit to483       them and fix them, instead of blaming user space.484 485       The fact that you have apparently been denying the regression now for486       three weeks means that I will revert, and I will stop pulling apparmor487       requests until the people involved understand how kernel development488       is done.489 490 * From `2017-10-26 (2/2)491   <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_::492 493       People should basically always feel like they can update their kernel494       and simply not have to worry about it.495 496       I refuse to introduce "you can only update the kernel if you also497       update that other program" kind of limitations. If the kernel used to498       work for you, the rule is that it continues to work for you.499 500       There have been exceptions, but they are few and far between, and they501       generally have some major and fundamental reasons for having happened,502       that were basically entirely unavoidable, and people _tried_hard_ to503       avoid them. Maybe we can't practically support the hardware any more504       after it is decades old and nobody uses it with modern kernels any505       more. Maybe there's a serious security issue with how we did things,506       and people actually depended on that fundamentally broken model. Maybe507       there was some fundamental other breakage that just _had_ to have a508       flag day for very core and fundamental reasons.509 510       And notice that this is very much about *breaking* peoples environments.511 512       Behavioral changes happen, and maybe we don't even support some513       feature any more. There's a number of fields in /proc/<pid>/stat that514       are printed out as zeroes, simply because they don't even *exist* in515       the kernel any more, or because showing them was a mistake (typically516       an information leak). But the numbers got replaced by zeroes, so that517       the code that used to parse the fields still works. The user might not518       see everything they used to see, and so behavior is clearly different,519       but things still _work_, even if they might no longer show sensitive520       (or no longer relevant) information.521 522       But if something actually breaks, then the change must get fixed or523       reverted. And it gets fixed in the *kernel*. Not by saying "well, fix524       your user space then". It was a kernel change that exposed the525       problem, it needs to be the kernel that corrects for it, because we526       have a "upgrade in place" model. We don't have a "upgrade with new527       user space".528 529       And I seriously will refuse to take code from people who do not530       understand and honor this very simple rule.531 532       This rule is also not going to change.533 534       And yes, I realize that the kernel is "special" in this respect. I'm535       proud of it.536 537       I have seen, and can point to, lots of projects that go "We need to538       break that use case in order to make progress" or "you relied on539       undocumented behavior, it sucks to be you" or "there's a better way to540       do what you want to do, and you have to change to that new better541       way", and I simply don't think that's acceptable outside of very early542       alpha releases that have experimental users that know what they signed543       up for. The kernel hasn't been in that situation for the last two544       decades.545 546       We do API breakage _inside_ the kernel all the time. We will fix547       internal problems by saying "you now need to do XYZ", but then it's548       about internal kernel API's, and the people who do that then also549       obviously have to fix up all the in-kernel users of that API. Nobody550       can say "I now broke the API you used, and now _you_ need to fix it551       up". Whoever broke something gets to fix it too.552 553       And we simply do not break user space.554 555 * From `2020-05-21556   <https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/>`_::557 558       The rules about regressions have never been about any kind of559       documented behavior, or where the code lives.560 561       The rules about regressions are always about "breaks user workflow".562 563       Users are literally the _only_ thing that matters.564 565       No amount of "you shouldn't have used this" or "that behavior was566       undefined, it's your own fault your app broke" or "that used to work567       simply because of a kernel bug" is at all relevant.568 569       Now, reality is never entirely black-and-white. So we've had things570       like "serious security issue" etc that just forces us to make changes571       that may break user space. But even then the rule is that we don't572       really have other options that would allow things to continue.573 574       And obviously, if users take years to even notice that something575       broke, or if we have sane ways to work around the breakage that576       doesn't make for too much trouble for users (ie "ok, there are a577       handful of users, and they can use a kernel command line to work578       around it" kind of things) we've also been a bit less strict.579 580       But no, "that was documented to be broken" (whether it's because the581       code was in staging or because the man-page said something else) is582       irrelevant. If staging code is so useful that people end up using it,583       that means that it's basically regular kernel code with a flag saying584       "please clean this up".585 586       The other side of the coin is that people who talk about "API587       stability" are entirely wrong. API's don't matter either. You can make588       any changes to an API you like - as long as nobody notices.589 590       Again, the regression rule is not about documentation, not about591       API's, and not about the phase of the moon.592 593       It's entirely about "we caused problems for user space that used to work".594 595 * From `2017-11-05596   <https://lore.kernel.org/all/CA+55aFzUvbGjD8nQ-+3oiMBx14c_6zOj2n7KLN3UsJ-qsd4Dcw@mail.gmail.com/>`_::597 598       And our regression rule has never been "behavior doesn't change".599       That would mean that we could never make any changes at all.600 601       For example, we do things like add new error handling etc all the602       time, which we then sometimes even add tests for in our kselftest603       directory.604 605       So clearly behavior changes all the time and we don't consider that a606       regression per se.607 608       The rule for a regression for the kernel is that some real user609       workflow breaks. Not some test. Not a "look, I used to be able to do610       X, now I can't".611 612 * From `2018-08-03613   <https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/>`_::614 615       YOU ARE MISSING THE #1 KERNEL RULE.616 617       We do not regress, and we do not regress exactly because your are 100% wrong.618 619       And the reason you state for your opinion is in fact exactly *WHY* you620       are wrong.621 622       Your "good reasons" are pure and utter garbage.623 624       The whole point of "we do not regress" is so that people can upgrade625       the kernel and never have to worry about it.626 627       > Kernel had a bug which has been fixed628 629       That is *ENTIRELY* immaterial.630 631       Guys, whether something was buggy or not DOES NOT MATTER.632 633       Why?634 635       Bugs happen. That's a fact of life. Arguing that "we had to break636       something because we were fixing a bug" is completely insane. We fix637       tens of bugs every single day, thinking that "fixing a bug" means that638       we can break something is simply NOT TRUE.639 640       So bugs simply aren't even relevant to the discussion. They happen,641       they get found, they get fixed, and it has nothing to do with "we642       break users".643 644       Because the only thing that matters IS THE USER.645 646       How hard is that to understand?647 648       Anybody who uses "but it was buggy" as an argument is entirely missing649       the point. As far as the USER was concerned, it wasn't buggy - it650       worked for him/her.651 652       Maybe it worked *because* the user had taken the bug into account,653       maybe it worked because the user didn't notice - again, it doesn't654       matter. It worked for the user.655 656       Breaking a user workflow for a "bug" is absolutely the WORST reason657       for breakage you can imagine.658 659       It's basically saying "I took something that worked, and I broke it,660       but now it's better". Do you not see how f*cking insane that statement661       is?662 663       And without users, your program is not a program, it's a pointless664       piece of code that you might as well throw away.665 666       Seriously. This is *why* the #1 rule for kernel development is "we667       don't break users". Because "I fixed a bug" is absolutely NOT AN668       ARGUMENT if that bug fix broke a user setup. You actually introduced a669       MUCH BIGGER bug by "fixing" something that the user clearly didn't670       even care about.671 672       And dammit, we upgrade the kernel ALL THE TIME without upgrading any673       other programs at all. It is absolutely required, because flag-days674       and dependencies are horribly bad.675 676       And it is also required simply because I as a kernel developer do not677       upgrade random other tools that I don't even care about as I develop678       the kernel, and I want any of my users to feel safe doing the same679       time.680 681       So no. Your rule is COMPLETELY wrong. If you cannot upgrade a kernel682       without upgrading some other random binary, then we have a problem.683 684 * From `2021-06-05685   <https://lore.kernel.org/all/CAHk-=wiUVqHN76YUwhkjZzwTdjMMJf_zN4+u7vEJjmEGh3recw@mail.gmail.com/>`_::686 687       THERE ARE NO VALID ARGUMENTS FOR REGRESSIONS.688 689       Honestly, security people need to understand that "not working" is not690       a success case of security. It's a failure case.691 692       Yes, "not working" may be secure. But security in that case is *pointless*.693 694 * From `2011-05-06 (1/3)695   <https://lore.kernel.org/all/BANLkTim9YvResB+PwRp7QTK-a5VNg2PvmQ@mail.gmail.com/>`_::696 697       Binary compatibility is more important.698 699       And if binaries don't use the interface to parse the format (or just700       parse it wrongly - see the fairly recent example of adding uuid's to701       /proc/self/mountinfo), then it's a regression.702 703       And regressions get reverted, unless there are security issues or704       similar that makes us go "Oh Gods, we really have to break things".705 706       I don't understand why this simple logic is so hard for some kernel707       developers to understand. Reality matters. Your personal wishes matter708       NOT AT ALL.709 710       If you made an interface that can be used without parsing the711       interface description, then we're stuck with the interface. Theory712       simply doesn't matter.713 714       You could help fix the tools, and try to avoid the compatibility715       issues that way. There aren't that many of them.716 717   From `2011-05-06 (2/3)718   <https://lore.kernel.org/all/BANLkTi=KVXjKR82sqsz4gwjr+E0vtqCmvA@mail.gmail.com/>`_::719 720       it's clearly NOT an internal tracepoint. By definition. It's being721       used by powertop.722 723   From `2011-05-06 (3/3)724   <https://lore.kernel.org/all/BANLkTinazaXRdGovYL7rRVp+j6HbJ7pzhg@mail.gmail.com/>`_::725 726       We have programs that use that ABI and thus it's a regression if they break.727 728 * From `2012-07-06 <https://lore.kernel.org/all/CA+55aFwnLJ+0sjx92EGREGTWOx84wwKaraSzpTNJwPVV8edw8g@mail.gmail.com/>`_::729 730       > Now this got me wondering if Debian _unstable_ actually qualifies as a731       > standard distro userspace.732 733       Oh, if the kernel breaks some standard user space, that counts. Tons734       of people run Debian unstable735 736 * From `2019-09-15737   <https://lore.kernel.org/lkml/CAHk-=wiP4K8DRJWsCo=20hn_6054xBamGKF2kPgUzpB5aMaofA@mail.gmail.com/>`_::738 739       One _particularly_ last-minute revert is the top-most commit (ignoring740       the version change itself) done just before the release, and while741       it's very annoying, it's perhaps also instructive.742 743       What's instructive about it is that I reverted a commit that wasn't744       actually buggy. In fact, it was doing exactly what it set out to do,745       and did it very well. In fact it did it _so_ well that the much746       improved IO patterns it caused then ended up revealing a user-visible747       regression due to a real bug in a completely unrelated area.748 749       The actual details of that regression are not the reason I point that750       revert out as instructive, though. It's more that it's an instructive751       example of what counts as a regression, and what the whole "no752       regressions" kernel rule means. The reverted commit didn't change any753       API's, and it didn't introduce any new bugs. But it ended up exposing754       another problem, and as such caused a kernel upgrade to fail for a755       user. So it got reverted.756 757       The point here being that we revert based on user-reported _behavior_,758       not based on some "it changes the ABI" or "it caused a bug" concept.759       The problem was really pre-existing, and it just didn't happen to760       trigger before. The better IO patterns introduced by the change just761       happened to expose an old bug, and people had grown to depend on the762       previously benign behavior of that old issue.763 764       And never fear, we'll re-introduce the fix that improved on the IO765       patterns once we've decided just how to handle the fact that we had a766       bad interaction with an interface that people had then just happened767       to rely on incidental behavior for before. It's just that we'll have768       to hash through how to do that (there are no less than three different769       patches by three different developers being discussed, and there might770       be more coming...). In the meantime, I reverted the thing that exposed771       the problem to users for this release, even if I hope it will be772       re-introduced (perhaps even backported as a stable patch) once we have773       consensus about the issue it exposed.774 775       Take-away from the whole thing: it's not about whether you change the776       kernel-userspace ABI, or fix a bug, or about whether the old code777       "should never have worked in the first place". It's about whether778       something breaks existing users' workflow.779 780       Anyway, that was my little aside on the whole regression thing.  Since781       it's that "first rule of kernel programming", I felt it is perhaps782       worth just bringing it up every once in a while783 784..785   end-of-content786..787   This text is available under GPL-2.0+ or CC-BY-4.0, as stated at the top788   of the file. If you want to distribute this text under CC-BY-4.0 only,789   please use "The Linux kernel developers" for author attribution and link790   this as source:791   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/handling-regressions.rst792..793   Note: Only the content of this RST file as found in the Linux kernel sources794   is available under CC-BY-4.0, as versions of this text that were processed795   (for example by the kernel's build system) might contain content taken from796   files which use a more restrictive license.797