11ecf393fSThorsten Leemhuis.. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0) 21ecf393fSThorsten Leemhuis.. [see the bottom of this file for redistribution information] 31ecf393fSThorsten Leemhuis 41ecf393fSThorsten LeemhuisReporting regressions 51ecf393fSThorsten Leemhuis+++++++++++++++++++++ 61ecf393fSThorsten Leemhuis 71ecf393fSThorsten Leemhuis"*We don't cause regressions*" is the first rule of Linux kernel development; 81ecf393fSThorsten LeemhuisLinux founder and lead developer Linus Torvalds established it himself and 91ecf393fSThorsten Leemhuisensures it's obeyed. 101ecf393fSThorsten Leemhuis 111ecf393fSThorsten LeemhuisThis document describes what the rule means for users and how the Linux kernel's 121ecf393fSThorsten Leemhuisdevelopment model ensures to address all reported regressions; aspects relevant 131ecf393fSThorsten Leemhuisfor kernel developers are left to Documentation/process/handling-regressions.rst. 141ecf393fSThorsten Leemhuis 151ecf393fSThorsten Leemhuis 161ecf393fSThorsten LeemhuisThe important bits (aka "TL;DR") 171ecf393fSThorsten Leemhuis================================ 181ecf393fSThorsten Leemhuis 191ecf393fSThorsten Leemhuis#. It's a regression if something running fine with one Linux kernel works worse 201ecf393fSThorsten Leemhuis or not at all with a newer version. Note, the newer kernel has to be compiled 211ecf393fSThorsten Leemhuis using a similar configuration; the detailed explanations below describes this 221ecf393fSThorsten Leemhuis and other fine print in more detail. 231ecf393fSThorsten Leemhuis 241ecf393fSThorsten Leemhuis#. Report your issue as outlined in Documentation/admin-guide/reporting-issues.rst, 251ecf393fSThorsten Leemhuis it already covers all aspects important for regressions and repeated 261ecf393fSThorsten Leemhuis below for convenience. Two of them are important: start your report's subject 271ecf393fSThorsten Leemhuis with "[REGRESSION]" and CC or forward it to `the regression mailing list 281ecf393fSThorsten Leemhuis <https://lore.kernel.org/regressions/>`_ (regressions@lists.linux.dev). 291ecf393fSThorsten Leemhuis 301ecf393fSThorsten Leemhuis#. Optional, but recommended: when sending or forwarding your report, make the 311ecf393fSThorsten Leemhuis Linux kernel regression tracking bot "regzbot" track the issue by specifying 321ecf393fSThorsten Leemhuis when the regression started like this:: 331ecf393fSThorsten Leemhuis 341ecf393fSThorsten Leemhuis #regzbot introduced v5.13..v5.14-rc1 351ecf393fSThorsten Leemhuis 361ecf393fSThorsten Leemhuis 371ecf393fSThorsten LeemhuisAll the details on Linux kernel regressions relevant for users 381ecf393fSThorsten Leemhuis============================================================== 391ecf393fSThorsten Leemhuis 401ecf393fSThorsten Leemhuis 411ecf393fSThorsten LeemhuisThe important basics 421ecf393fSThorsten Leemhuis-------------------- 431ecf393fSThorsten Leemhuis 441ecf393fSThorsten Leemhuis 451ecf393fSThorsten LeemhuisWhat is a "regression" and what is the "no regressions rule"? 461ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 471ecf393fSThorsten Leemhuis 481ecf393fSThorsten LeemhuisIt's a regression if some application or practical use case running fine with 491ecf393fSThorsten Leemhuisone Linux kernel works worse or not at all with a newer version compiled using a 501ecf393fSThorsten Leemhuissimilar configuration. The "no regressions rule" forbids this to take place; if 511ecf393fSThorsten Leemhuisit happens by accident, developers that caused it are expected to quickly fix 521ecf393fSThorsten Leemhuisthe issue. 531ecf393fSThorsten Leemhuis 541ecf393fSThorsten LeemhuisIt thus is a regression when a WiFi driver from Linux 5.13 works fine, but with 551ecf393fSThorsten Leemhuis5.14 doesn't work at all, works significantly slower, or misbehaves somehow. 561ecf393fSThorsten LeemhuisIt's also a regression if a perfectly working application suddenly shows erratic 571ecf393fSThorsten Leemhuisbehavior with a newer kernel version; such issues can be caused by changes in 581ecf393fSThorsten Leemhuisprocfs, sysfs, or one of the many other interfaces Linux provides to userland 591ecf393fSThorsten Leemhuissoftware. But keep in mind, as mentioned earlier: 5.14 in this example needs to 601ecf393fSThorsten Leemhuisbe built from a configuration similar to the one from 5.13. This can be achieved 611ecf393fSThorsten Leemhuisusing ``make olddefconfig``, as explained in more detail below. 621ecf393fSThorsten Leemhuis 631ecf393fSThorsten LeemhuisNote the "practical use case" in the first sentence of this section: developers 641ecf393fSThorsten Leemhuisdespite the "no regressions" rule are free to change any aspect of the kernel 651ecf393fSThorsten Leemhuisand even APIs or ABIs to userland, as long as no existing application or use 661ecf393fSThorsten Leemhuiscase breaks. 671ecf393fSThorsten Leemhuis 681ecf393fSThorsten LeemhuisAlso be aware the "no regressions" rule covers only interfaces the kernel 691ecf393fSThorsten Leemhuisprovides to the userland. It thus does not apply to kernel-internal interfaces 701ecf393fSThorsten Leemhuislike the module API, which some externally developed drivers use to hook into 711ecf393fSThorsten Leemhuisthe kernel. 721ecf393fSThorsten Leemhuis 731ecf393fSThorsten LeemhuisHow do I report a regression? 741ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 751ecf393fSThorsten Leemhuis 761ecf393fSThorsten LeemhuisJust report the issue as outlined in 771ecf393fSThorsten LeemhuisDocumentation/admin-guide/reporting-issues.rst, it already describes the 781ecf393fSThorsten Leemhuisimportant points. The following aspects outlined there are especially relevant 791ecf393fSThorsten Leemhuisfor regressions: 801ecf393fSThorsten Leemhuis 811ecf393fSThorsten Leemhuis * When checking for existing reports to join, also search the `archives of the 821ecf393fSThorsten Leemhuis Linux regressions mailing list <https://lore.kernel.org/regressions/>`_ and 831ecf393fSThorsten Leemhuis `regzbot's web-interface <https://linux-regtracking.leemhuis.info/regzbot/>`_. 841ecf393fSThorsten Leemhuis 851ecf393fSThorsten Leemhuis * Start your report's subject with "[REGRESSION]". 861ecf393fSThorsten Leemhuis 871ecf393fSThorsten Leemhuis * In your report, clearly mention the last kernel version that worked fine and 881ecf393fSThorsten Leemhuis the first broken one. Ideally try to find the exact change causing the 891ecf393fSThorsten Leemhuis regression using a bisection, as explained below in more detail. 901ecf393fSThorsten Leemhuis 911ecf393fSThorsten Leemhuis * Remember to let the Linux regressions mailing list 921ecf393fSThorsten Leemhuis (regressions@lists.linux.dev) know about your report: 931ecf393fSThorsten Leemhuis 941ecf393fSThorsten Leemhuis * If you report the regression by mail, CC the regressions list. 951ecf393fSThorsten Leemhuis 961ecf393fSThorsten Leemhuis * If you report your regression to some bug tracker, forward the submitted 971ecf393fSThorsten Leemhuis report by mail to the regressions list while CCing the maintainer and the 981ecf393fSThorsten Leemhuis mailing list for the subsystem in question. 991ecf393fSThorsten Leemhuis 1001ecf393fSThorsten Leemhuis If it's a regression within a stable or longterm series (e.g. 1011ecf393fSThorsten Leemhuis v5.15.3..v5.15.5), remember to CC the `Linux stable mailing list 1021ecf393fSThorsten Leemhuis <https://lore.kernel.org/stable/>`_ (stable@vger.kernel.org). 1031ecf393fSThorsten Leemhuis 1041ecf393fSThorsten Leemhuis In case you performed a successful bisection, add everyone to the CC the 1051ecf393fSThorsten Leemhuis culprit's commit message mentions in lines starting with "Signed-off-by:". 1061ecf393fSThorsten Leemhuis 1071ecf393fSThorsten LeemhuisWhen CCing for forwarding your report to the list, consider directly telling the 1081ecf393fSThorsten Leemhuisaforementioned Linux kernel regression tracking bot about your report. To do 1091ecf393fSThorsten Leemhuisthat, include a paragraph like this in your mail:: 1101ecf393fSThorsten Leemhuis 1111ecf393fSThorsten Leemhuis #regzbot introduced: v5.13..v5.14-rc1 1121ecf393fSThorsten Leemhuis 1131ecf393fSThorsten LeemhuisRegzbot will then consider your mail a report for a regression introduced in the 1141ecf393fSThorsten Leemhuisspecified version range. In above case Linux v5.13 still worked fine and Linux 1151ecf393fSThorsten Leemhuisv5.14-rc1 was the first version where you encountered the issue. If you 1161ecf393fSThorsten Leemhuisperformed a bisection to find the commit that caused the regression, specify the 1171ecf393fSThorsten Leemhuisculprit's commit-id instead:: 1181ecf393fSThorsten Leemhuis 1191ecf393fSThorsten Leemhuis #regzbot introduced: 1f2e3d4c5d 1201ecf393fSThorsten Leemhuis 1211ecf393fSThorsten LeemhuisPlacing such a "regzbot command" is in your interest, as it will ensure the 1221ecf393fSThorsten Leemhuisreport won't fall through the cracks unnoticed. If you omit this, the Linux 1231ecf393fSThorsten Leemhuiskernel's regressions tracker will take care of telling regzbot about your 1241ecf393fSThorsten Leemhuisregression, as long as you send a copy to the regressions mailing lists. But the 1251ecf393fSThorsten Leemhuisregression tracker is just one human which sometimes has to rest or occasionally 1261ecf393fSThorsten Leemhuismight even enjoy some time away from computers (as crazy as that might sound). 1271ecf393fSThorsten LeemhuisRelying on this person thus will result in an unnecessary delay before the 1281ecf393fSThorsten Leemhuisregressions becomes mentioned `on the list of tracked and unresolved Linux 1291ecf393fSThorsten Leemhuiskernel regressions <https://linux-regtracking.leemhuis.info/regzbot/>`_ and the 1301ecf393fSThorsten Leemhuisweekly regression reports sent by regzbot. Such delays can result in Linus 1311ecf393fSThorsten LeemhuisTorvalds being unaware of important regressions when deciding between "continue 1321ecf393fSThorsten Leemhuisdevelopment or call this finished and release the final?". 1331ecf393fSThorsten Leemhuis 1341ecf393fSThorsten LeemhuisAre really all regressions fixed? 1351ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1361ecf393fSThorsten Leemhuis 1371ecf393fSThorsten LeemhuisNearly all of them are, as long as the change causing the regression (the 1381ecf393fSThorsten Leemhuis"culprit commit") is reliably identified. Some regressions can be fixed without 1391ecf393fSThorsten Leemhuisthis, but often it's required. 1401ecf393fSThorsten Leemhuis 1411ecf393fSThorsten LeemhuisWho needs to find the root cause of a regression? 1421ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1431ecf393fSThorsten Leemhuis 1441ecf393fSThorsten LeemhuisDevelopers of the affected code area should try to locate the culprit on their 1451ecf393fSThorsten Leemhuisown. But for them that's often impossible to do with reasonable effort, as quite 1461ecf393fSThorsten Leemhuisa lot of issues only occur in a particular environment outside the developer's 1471ecf393fSThorsten Leemhuisreach -- for example, a specific hardware platform, firmware, Linux distro, 1481ecf393fSThorsten Leemhuissystem's configuration, or application. That's why in the end it's often up to 1491ecf393fSThorsten Leemhuisthe reporter to locate the culprit commit; sometimes users might even need to 1501ecf393fSThorsten Leemhuisrun additional tests afterwards to pinpoint the exact root cause. Developers 1511ecf393fSThorsten Leemhuisshould offer advice and reasonably help where they can, to make this process 1521ecf393fSThorsten Leemhuisrelatively easy and achievable for typical users. 1531ecf393fSThorsten Leemhuis 1541ecf393fSThorsten LeemhuisHow can I find the culprit? 1551ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1561ecf393fSThorsten Leemhuis 1571ecf393fSThorsten LeemhuisPerform a bisection, as roughly outlined in 1581ecf393fSThorsten LeemhuisDocumentation/admin-guide/reporting-issues.rst and described in more detail by 1591ecf393fSThorsten LeemhuisDocumentation/admin-guide/bug-bisect.rst. It might sound like a lot of work, but 1601ecf393fSThorsten Leemhuisin many cases finds the culprit relatively quickly. If it's hard or 1611ecf393fSThorsten Leemhuistime-consuming to reliably reproduce the issue, consider teaming up with other 1621ecf393fSThorsten Leemhuisaffected users to narrow down the search range together. 1631ecf393fSThorsten Leemhuis 1641ecf393fSThorsten LeemhuisWho can I ask for advice when it comes to regressions? 1651ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1661ecf393fSThorsten Leemhuis 1671ecf393fSThorsten LeemhuisSend a mail to the regressions mailing list (regressions@lists.linux.dev) while 1681ecf393fSThorsten LeemhuisCCing the Linux kernel's regression tracker (regressions@leemhuis.info); if the 1691ecf393fSThorsten Leemhuisissue might better be dealt with in private, feel free to omit the list. 1701ecf393fSThorsten Leemhuis 1711ecf393fSThorsten Leemhuis 1721ecf393fSThorsten LeemhuisAdditional details about regressions 1731ecf393fSThorsten Leemhuis------------------------------------ 1741ecf393fSThorsten Leemhuis 1751ecf393fSThorsten Leemhuis 1761ecf393fSThorsten LeemhuisWhat is the goal of the "no regressions rule"? 1771ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1781ecf393fSThorsten Leemhuis 1791ecf393fSThorsten LeemhuisUsers should feel safe when updating kernel versions and not have to worry 1801ecf393fSThorsten Leemhuissomething might break. This is in the interest of the kernel developers to make 1811ecf393fSThorsten Leemhuisupdating attractive: they don't want users to stay on stable or longterm Linux 1821ecf393fSThorsten Leemhuisseries that are either abandoned or more than one and a half years old. That's 1831ecf393fSThorsten Leemhuisin everybody's interest, as `those series might have known bugs, security 1841ecf393fSThorsten Leemhuisissues, or other problematic aspects already fixed in later versions 1851ecf393fSThorsten Leemhuis<http://www.kroah.com/log/blog/2018/08/24/what-stable-kernel-should-i-use/>`_. 1861ecf393fSThorsten LeemhuisAdditionally, the kernel developers want to make it simple and appealing for 1871ecf393fSThorsten Leemhuisusers to test the latest pre-release or regular release. That's also in 1881ecf393fSThorsten Leemhuiseverybody's interest, as it's a lot easier to track down and fix problems, if 1891ecf393fSThorsten Leemhuisthey are reported shortly after being introduced. 1901ecf393fSThorsten Leemhuis 1911ecf393fSThorsten LeemhuisIs the "no regressions" rule really adhered in practice? 1921ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1931ecf393fSThorsten Leemhuis 1941ecf393fSThorsten LeemhuisIt's taken really seriously, as can be seen by many mailing list posts from 1951ecf393fSThorsten LeemhuisLinux creator and lead developer Linus Torvalds, some of which are quoted in 1961ecf393fSThorsten LeemhuisDocumentation/process/handling-regressions.rst. 1971ecf393fSThorsten Leemhuis 1981ecf393fSThorsten LeemhuisExceptions to this rule are extremely rare; in the past developers almost always 1991ecf393fSThorsten Leemhuisturned out to be wrong when they assumed a particular situation was warranting 2001ecf393fSThorsten Leemhuisan exception. 2011ecf393fSThorsten Leemhuis 2021ecf393fSThorsten LeemhuisWho ensures the "no regressions" is actually followed? 2031ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2041ecf393fSThorsten Leemhuis 2051ecf393fSThorsten LeemhuisThe subsystem maintainers should take care of that, which are watched and 2061ecf393fSThorsten Leemhuissupported by the tree maintainers -- e.g. Linus Torvalds for mainline and 2071ecf393fSThorsten LeemhuisGreg Kroah-Hartman et al. for various stable/longterm series. 2081ecf393fSThorsten Leemhuis 2091ecf393fSThorsten LeemhuisAll of them are helped by people trying to ensure no regression report falls 2101ecf393fSThorsten Leemhuisthrough the cracks. One of them is Thorsten Leemhuis, who's currently acting as 2111ecf393fSThorsten Leemhuisthe Linux kernel's "regressions tracker"; to facilitate this work he relies on 2121ecf393fSThorsten Leemhuisregzbot, the Linux kernel regression tracking bot. That's why you want to bring 2131ecf393fSThorsten Leemhuisyour report on the radar of these people by CCing or forwarding each report to 2141ecf393fSThorsten Leemhuisthe regressions mailing list, ideally with a "regzbot command" in your mail to 2151ecf393fSThorsten Leemhuisget it tracked immediately. 2161ecf393fSThorsten Leemhuis 217*d2b40ba2SThorsten LeemhuisHow quickly are regressions normally fixed? 218*d2b40ba2SThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 219*d2b40ba2SThorsten Leemhuis 220*d2b40ba2SThorsten LeemhuisDevelopers should fix any reported regression as quickly as possible, to provide 221*d2b40ba2SThorsten Leemhuisaffected users with a solution in a timely manner and prevent more users from 222*d2b40ba2SThorsten Leemhuisrunning into the issue; nevertheless developers need to take enough time and 223*d2b40ba2SThorsten Leemhuiscare to ensure regression fixes do not cause additional damage. 224*d2b40ba2SThorsten Leemhuis 225*d2b40ba2SThorsten LeemhuisThe answer thus depends on various factors like the impact of a regression, its 226*d2b40ba2SThorsten Leemhuisage, or the Linux series in which it occurs. In the end though, most regressions 227*d2b40ba2SThorsten Leemhuisshould be fixed within two weeks. 228*d2b40ba2SThorsten Leemhuis 2291ecf393fSThorsten LeemhuisIs it a regression, if the issue can be avoided by updating some software? 2301ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2311ecf393fSThorsten Leemhuis 2321ecf393fSThorsten LeemhuisAlmost always: yes. If a developer tells you otherwise, ask the regression 2331ecf393fSThorsten Leemhuistracker for advice as outlined above. 2341ecf393fSThorsten Leemhuis 2351ecf393fSThorsten LeemhuisIs it a regression, if a newer kernel works slower or consumes more energy? 2361ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2371ecf393fSThorsten Leemhuis 2381ecf393fSThorsten LeemhuisYes, but the difference has to be significant. A five percent slow-down in a 2391ecf393fSThorsten Leemhuismicro-benchmark thus is unlikely to qualify as regression, unless it also 2401ecf393fSThorsten Leemhuisinfluences the results of a broad benchmark by more than one percent. If in 2411ecf393fSThorsten Leemhuisdoubt, ask for advice. 2421ecf393fSThorsten Leemhuis 2431ecf393fSThorsten LeemhuisIs it a regression, if an external kernel module breaks when updating Linux? 2441ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2451ecf393fSThorsten Leemhuis 2461ecf393fSThorsten LeemhuisNo, as the "no regression" rule is about interfaces and services the Linux 2471ecf393fSThorsten Leemhuiskernel provides to the userland. It thus does not cover building or running 2481ecf393fSThorsten Leemhuisexternally developed kernel modules, as they run in kernel-space and hook into 2491ecf393fSThorsten Leemhuisthe kernel using internal interfaces occasionally changed. 2501ecf393fSThorsten Leemhuis 2511ecf393fSThorsten LeemhuisHow are regressions handled that are caused by security fixes? 2521ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2531ecf393fSThorsten Leemhuis 2541ecf393fSThorsten LeemhuisIn extremely rare situations security issues can't be fixed without causing 2551ecf393fSThorsten Leemhuisregressions; those fixes are given way, as they are the lesser evil in the end. 2561ecf393fSThorsten LeemhuisLuckily this middling almost always can be avoided, as key developers for the 2571ecf393fSThorsten Leemhuisaffected area and often Linus Torvalds himself try very hard to fix security 2581ecf393fSThorsten Leemhuisissues without causing regressions. 2591ecf393fSThorsten Leemhuis 2601ecf393fSThorsten LeemhuisIf you nevertheless face such a case, check the mailing list archives if people 2611ecf393fSThorsten Leemhuistried their best to avoid the regression. If not, report it; if in doubt, ask 2621ecf393fSThorsten Leemhuisfor advice as outlined above. 2631ecf393fSThorsten Leemhuis 2641ecf393fSThorsten LeemhuisWhat happens if fixing a regression is impossible without causing another? 2651ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2661ecf393fSThorsten Leemhuis 2671ecf393fSThorsten LeemhuisSadly these things happen, but luckily not very often; if they occur, expert 2681ecf393fSThorsten Leemhuisdevelopers of the affected code area should look into the issue to find a fix 2691ecf393fSThorsten Leemhuisthat avoids regressions or at least their impact. If you run into such a 2701ecf393fSThorsten Leemhuissituation, do what was outlined already for regressions caused by security 2711ecf393fSThorsten Leemhuisfixes: check earlier discussions if people already tried their best and ask for 2721ecf393fSThorsten Leemhuisadvice if in doubt. 2731ecf393fSThorsten Leemhuis 2741ecf393fSThorsten LeemhuisA quick note while at it: these situations could be avoided, if people would 2751ecf393fSThorsten Leemhuisregularly give mainline pre-releases (say v5.15-rc1 or -rc3) from each 2761ecf393fSThorsten Leemhuisdevelopment cycle a test run. This is best explained by imagining a change 2771ecf393fSThorsten Leemhuisintegrated between Linux v5.14 and v5.15-rc1 which causes a regression, but at 2781ecf393fSThorsten Leemhuisthe same time is a hard requirement for some other improvement applied for 2791ecf393fSThorsten Leemhuis5.15-rc1. All these changes often can simply be reverted and the regression thus 2801ecf393fSThorsten Leemhuissolved, if someone finds and reports it before 5.15 is released. A few days or 2811ecf393fSThorsten Leemhuisweeks later this solution can become impossible, as some software might have 2821ecf393fSThorsten Leemhuisstarted to rely on aspects introduced by one of the follow-up changes: reverting 2831ecf393fSThorsten Leemhuisall changes would then cause a regression for users of said software and thus is 2841ecf393fSThorsten Leemhuisout of the question. 2851ecf393fSThorsten Leemhuis 2861ecf393fSThorsten LeemhuisIs it a regression, if some feature I relied on was removed months ago? 2871ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2881ecf393fSThorsten Leemhuis 2891ecf393fSThorsten LeemhuisIt is, but often it's hard to fix such regressions due to the aspects outlined 2901ecf393fSThorsten Leemhuisin the previous section. It hence needs to be dealt with on a case-by-case 2911ecf393fSThorsten Leemhuisbasis. This is another reason why it's in everybody's interest to regularly test 2921ecf393fSThorsten Leemhuismainline pre-releases. 2931ecf393fSThorsten Leemhuis 2941ecf393fSThorsten LeemhuisDoes the "no regression" rule apply if I seem to be the only affected person? 2951ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2961ecf393fSThorsten Leemhuis 2971ecf393fSThorsten LeemhuisIt does, but only for practical usage: the Linux developers want to be free to 2981ecf393fSThorsten Leemhuisremove support for hardware only to be found in attics and museums anymore. 2991ecf393fSThorsten Leemhuis 3001ecf393fSThorsten LeemhuisNote, sometimes regressions can't be avoided to make progress -- and the latter 3011ecf393fSThorsten Leemhuisis needed to prevent Linux from stagnation. Hence, if only very few users seem 3021ecf393fSThorsten Leemhuisto be affected by a regression, it for the greater good might be in their and 3031ecf393fSThorsten Leemhuiseveryone else's interest to lettings things pass. Especially if there is an 3041ecf393fSThorsten Leemhuiseasy way to circumvent the regression somehow, for example by updating some 3051ecf393fSThorsten Leemhuissoftware or using a kernel parameter created just for this purpose. 3061ecf393fSThorsten Leemhuis 3071ecf393fSThorsten LeemhuisDoes the regression rule apply for code in the staging tree as well? 3081ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3091ecf393fSThorsten Leemhuis 3101ecf393fSThorsten LeemhuisNot according to the `help text for the configuration option covering all 3111ecf393fSThorsten Leemhuisstaging code <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/Kconfig>`_, 3121ecf393fSThorsten Leemhuiswhich since its early days states:: 3131ecf393fSThorsten Leemhuis 3141ecf393fSThorsten Leemhuis Please note that these drivers are under heavy development, may or 3151ecf393fSThorsten Leemhuis may not work, and may contain userspace interfaces that most likely 3161ecf393fSThorsten Leemhuis will be changed in the near future. 3171ecf393fSThorsten Leemhuis 3181ecf393fSThorsten LeemhuisThe staging developers nevertheless often adhere to the "no regressions" rule, 3191ecf393fSThorsten Leemhuisbut sometimes bend it to make progress. That's for example why some users had to 3201ecf393fSThorsten Leemhuisdeal with (often negligible) regressions when a WiFi driver from the staging 3211ecf393fSThorsten Leemhuistree was replaced by a totally different one written from scratch. 3221ecf393fSThorsten Leemhuis 3231ecf393fSThorsten LeemhuisWhy do later versions have to be "compiled with a similar configuration"? 3241ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3251ecf393fSThorsten Leemhuis 3261ecf393fSThorsten LeemhuisBecause the Linux kernel developers sometimes integrate changes known to cause 3271ecf393fSThorsten Leemhuisregressions, but make them optional and disable them in the kernel's default 3281ecf393fSThorsten Leemhuisconfiguration. This trick allows progress, as the "no regressions" rule 3291ecf393fSThorsten Leemhuisotherwise would lead to stagnation. 3301ecf393fSThorsten Leemhuis 3311ecf393fSThorsten LeemhuisConsider for example a new security feature blocking access to some kernel 3321ecf393fSThorsten Leemhuisinterfaces often abused by malware, which at the same time are required to run a 3331ecf393fSThorsten Leemhuisfew rarely used applications. The outlined approach makes both camps happy: 3341ecf393fSThorsten Leemhuispeople using these applications can leave the new security feature off, while 3351ecf393fSThorsten Leemhuiseveryone else can enable it without running into trouble. 3361ecf393fSThorsten Leemhuis 3371ecf393fSThorsten LeemhuisHow to create a configuration similar to the one of an older kernel? 3381ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3391ecf393fSThorsten Leemhuis 3401ecf393fSThorsten LeemhuisStart your machine with a known-good kernel and configure the newer Linux 3411ecf393fSThorsten Leemhuisversion with ``make olddefconfig``. This makes the kernel's build scripts pick 3421ecf393fSThorsten Leemhuisup the configuration file (the ".config" file) from the running kernel as base 3431ecf393fSThorsten Leemhuisfor the new one you are about to compile; afterwards they set all new 3441ecf393fSThorsten Leemhuisconfiguration options to their default value, which should disable new features 3451ecf393fSThorsten Leemhuisthat might cause regressions. 3461ecf393fSThorsten Leemhuis 3471ecf393fSThorsten LeemhuisCan I report a regression I found with pre-compiled vanilla kernels? 3481ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3491ecf393fSThorsten Leemhuis 3501ecf393fSThorsten LeemhuisYou need to ensure the newer kernel was compiled with a similar configuration 3511ecf393fSThorsten Leemhuisfile as the older one (see above), as those that built them might have enabled 3521ecf393fSThorsten Leemhuissome known-to-be incompatible feature for the newer kernel. If in doubt, report 3531ecf393fSThorsten Leemhuisthe matter to the kernel's provider and ask for advice. 3541ecf393fSThorsten Leemhuis 3551ecf393fSThorsten Leemhuis 3561ecf393fSThorsten LeemhuisMore about regression tracking with "regzbot" 3571ecf393fSThorsten Leemhuis--------------------------------------------- 3581ecf393fSThorsten Leemhuis 3591ecf393fSThorsten LeemhuisWhat is regression tracking and why should I care about it? 3601ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3611ecf393fSThorsten Leemhuis 3621ecf393fSThorsten LeemhuisRules like "no regressions" need someone to ensure they are followed, otherwise 3631ecf393fSThorsten Leemhuisthey are broken either accidentally or on purpose. History has shown this to be 3641ecf393fSThorsten Leemhuistrue for Linux kernel development as well. That's why Thorsten Leemhuis, the 3651ecf393fSThorsten LeemhuisLinux Kernel's regression tracker, and some people try to ensure all regression 3661ecf393fSThorsten Leemhuisare fixed by keeping an eye on them until they are resolved. Neither of them are 3671ecf393fSThorsten Leemhuispaid for this, that's why the work is done on a best effort basis. 3681ecf393fSThorsten Leemhuis 3691ecf393fSThorsten LeemhuisWhy and how are Linux kernel regressions tracked using a bot? 3701ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3711ecf393fSThorsten Leemhuis 3721ecf393fSThorsten LeemhuisTracking regressions completely manually has proven to be quite hard due to the 3731ecf393fSThorsten Leemhuisdistributed and loosely structured nature of Linux kernel development process. 3741ecf393fSThorsten LeemhuisThat's why the Linux kernel's regression tracker developed regzbot to facilitate 3751ecf393fSThorsten Leemhuisthe work, with the long term goal to automate regression tracking as much as 3761ecf393fSThorsten Leemhuispossible for everyone involved. 3771ecf393fSThorsten Leemhuis 3781ecf393fSThorsten LeemhuisRegzbot works by watching for replies to reports of tracked regressions. 3791ecf393fSThorsten LeemhuisAdditionally, it's looking out for posted or committed patches referencing such 3801ecf393fSThorsten Leemhuisreports with "Link:" tags; replies to such patch postings are tracked as well. 3811ecf393fSThorsten LeemhuisCombined this data provides good insights into the current state of the fixing 3821ecf393fSThorsten Leemhuisprocess. 3831ecf393fSThorsten Leemhuis 3841ecf393fSThorsten LeemhuisHow to see which regressions regzbot tracks currently? 3851ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3861ecf393fSThorsten Leemhuis 3871ecf393fSThorsten LeemhuisCheck out `regzbot's web-interface <https://linux-regtracking.leemhuis.info/regzbot/>`_. 3881ecf393fSThorsten Leemhuis 3891ecf393fSThorsten LeemhuisWhat kind of issues are supposed to be tracked by regzbot? 3901ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3911ecf393fSThorsten Leemhuis 3921ecf393fSThorsten LeemhuisThe bot is meant to track regressions, hence please don't involve regzbot for 3931ecf393fSThorsten Leemhuisregular issues. But it's okay for the Linux kernel's regression tracker if you 3941ecf393fSThorsten Leemhuisinvolve regzbot to track severe issues, like reports about hangs, corrupted 3951ecf393fSThorsten Leemhuisdata, or internal errors (Panic, Oops, BUG(), warning, ...). 3961ecf393fSThorsten Leemhuis 3971ecf393fSThorsten LeemhuisHow to change aspects of a tracked regression? 3981ecf393fSThorsten Leemhuis~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3991ecf393fSThorsten Leemhuis 4001ecf393fSThorsten LeemhuisBy using a 'regzbot command' in a direct or indirect reply to the mail with the 4011ecf393fSThorsten Leemhuisreport. The easiest way to do that: find the report in your "Sent" folder or the 4021ecf393fSThorsten Leemhuismailing list archive and reply to it using your mailer's "Reply-all" function. 4031ecf393fSThorsten LeemhuisIn that mail, use one of the following commands in a stand-alone paragraph (IOW: 4041ecf393fSThorsten Leemhuisuse blank lines to separate one or multiple of these commands from the rest of 4051ecf393fSThorsten Leemhuisthe mail's text). 4061ecf393fSThorsten Leemhuis 4071ecf393fSThorsten Leemhuis * Update when the regression started to happen, for example after performing a 4081ecf393fSThorsten Leemhuis bisection:: 4091ecf393fSThorsten Leemhuis 4101ecf393fSThorsten Leemhuis #regzbot introduced: 1f2e3d4c5d 4111ecf393fSThorsten Leemhuis 4121ecf393fSThorsten Leemhuis * Set or update the title:: 4131ecf393fSThorsten Leemhuis 4141ecf393fSThorsten Leemhuis #regzbot title: foo 4151ecf393fSThorsten Leemhuis 4161ecf393fSThorsten Leemhuis * Monitor a discussion or bugzilla.kernel.org ticket where additions aspects of 4171ecf393fSThorsten Leemhuis the issue or a fix are discussed::: 4181ecf393fSThorsten Leemhuis 4191ecf393fSThorsten Leemhuis #regzbot monitor: https://lore.kernel.org/r/30th.anniversary.repost@klaava.Helsinki.FI/ 4201ecf393fSThorsten Leemhuis #regzbot monitor: https://bugzilla.kernel.org/show_bug.cgi?id=123456789 4211ecf393fSThorsten Leemhuis 4221ecf393fSThorsten Leemhuis * Point to a place with further details of interest, like a mailing list post 4231ecf393fSThorsten Leemhuis or a ticket in a bug tracker that are slightly related, but about a different 4241ecf393fSThorsten Leemhuis topic:: 4251ecf393fSThorsten Leemhuis 4261ecf393fSThorsten Leemhuis #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=123456789 4271ecf393fSThorsten Leemhuis 4281ecf393fSThorsten Leemhuis * Mark a regression as invalid:: 4291ecf393fSThorsten Leemhuis 4301ecf393fSThorsten Leemhuis #regzbot invalid: wasn't a regression, problem has always existed 4311ecf393fSThorsten Leemhuis 4321ecf393fSThorsten LeemhuisRegzbot supports a few other commands primarily used by developers or people 4331ecf393fSThorsten Leemhuistracking regressions. They and more details about the aforementioned regzbot 4341ecf393fSThorsten Leemhuiscommands can be found in the `getting started guide 4351ecf393fSThorsten Leemhuis<https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md>`_ and 4361ecf393fSThorsten Leemhuisthe `reference documentation <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md>`_ 4371ecf393fSThorsten Leemhuisfor regzbot. 4381ecf393fSThorsten Leemhuis 4391ecf393fSThorsten Leemhuis.. 4401ecf393fSThorsten Leemhuis end-of-content 4411ecf393fSThorsten Leemhuis.. 4421ecf393fSThorsten Leemhuis This text is available under GPL-2.0+ or CC-BY-4.0, as stated at the top 4431ecf393fSThorsten Leemhuis of the file. If you want to distribute this text under CC-BY-4.0 only, 4441ecf393fSThorsten Leemhuis please use "The Linux kernel developers" for author attribution and link 4451ecf393fSThorsten Leemhuis this as source: 4461ecf393fSThorsten Leemhuis https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/admin-guide/reporting-regressions.rst 4471ecf393fSThorsten Leemhuis.. 4481ecf393fSThorsten Leemhuis Note: Only the content of this RST file as found in the Linux kernel sources 4491ecf393fSThorsten Leemhuis is available under CC-BY-4.0, as versions of this text that were processed 4501ecf393fSThorsten Leemhuis (for example by the kernel's build system) might contain content taken from 4511ecf393fSThorsten Leemhuis files which use a more restrictive license. 452