1 .. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY 1 .. SPDX-License-Identifier: (GPL-2.0+ OR CC-BY-4.0) 2 .. See the bottom of this file for additional 2 .. See the bottom of this file for additional redistribution information. 3 3 4 Handling regressions 4 Handling regressions 5 ++++++++++++++++++++ 5 ++++++++++++++++++++ 6 6 7 *We don't cause regressions* -- this document 7 *We don't cause regressions* -- this document describes what this "first rule of 8 Linux kernel development" means in practice fo 8 Linux kernel development" means in practice for developers. It complements 9 Documentation/admin-guide/reporting-regression 9 Documentation/admin-guide/reporting-regressions.rst, which covers the topic from a 10 user's point of view; if you never read that t 10 user's point of view; if you never read that text, go and at least skim over it 11 before continuing here. 11 before continuing here. 12 12 13 The important bits (aka "The TL;DR") 13 The important bits (aka "The TL;DR") 14 ==================================== 14 ==================================== 15 15 16 #. Ensure subscribers of the `regression maili 16 #. Ensure subscribers of the `regression mailing list <https://lore.kernel.org/regressions/>`_ 17 (regressions@lists.linux.dev) quickly becom 17 (regressions@lists.linux.dev) quickly become aware of any new regression 18 report: 18 report: 19 19 20 * When receiving a mailed report that did 20 * When receiving a mailed report that did not CC the list, bring it into the 21 loop by immediately sending at least a b 21 loop by immediately sending at least a brief "Reply-all" with the list 22 CCed. 22 CCed. 23 23 24 * Forward or bounce any reports submitted 24 * Forward or bounce any reports submitted in bug trackers to the list. 25 25 26 #. Make the Linux kernel regression tracking b 26 #. Make the Linux kernel regression tracking bot "regzbot" track the issue (this 27 is optional, but recommended): 27 is optional, but recommended): 28 28 29 * For mailed reports, check if the reporte 29 * For mailed reports, check if the reporter included a line like ``#regzbot 30 introduced: v5.13..v5.14-rc1``. If not, !! 30 introduced v5.13..v5.14-rc1``. If not, send a reply (with the regressions 31 list in CC) containing a paragraph like 31 list in CC) containing a paragraph like the following, which tells regzbot 32 when the issue started to happen:: 32 when the issue started to happen:: 33 33 34 #regzbot ^introduced: 1f2e3d4c5b6a !! 34 #regzbot ^introduced 1f2e3d4c5b6a 35 35 36 * When forwarding reports from a bug track 36 * When forwarding reports from a bug tracker to the regressions list (see 37 above), include a paragraph like the fol 37 above), include a paragraph like the following:: 38 38 39 #regzbot introduced: v5.13..v5.14-rc1 39 #regzbot introduced: v5.13..v5.14-rc1 40 #regzbot from: Some N. Ice Human <some.h 40 #regzbot from: Some N. Ice Human <some.human@example.com> 41 #regzbot monitor: http://some.bugtracke 41 #regzbot monitor: http://some.bugtracker.example.com/ticket?id=123456789 42 42 43 #. When submitting fixes for regressions, add !! 43 #. When submitting fixes for regressions, add "Link:" tags to the patch 44 description pointing to all places where th 44 description pointing to all places where the issue was reported, as 45 mandated by Documentation/process/submittin 45 mandated by Documentation/process/submitting-patches.rst and 46 :ref:`Documentation/process/5.Posting.rst < !! 46 :ref:`Documentation/process/5.Posting.rst <development_posting>`. 47 only fixing part of the issue that caused t << 48 "Link:" tags instead. regzbot currently mak << 49 two. << 50 47 51 #. Try to fix regressions quickly once the cul 48 #. Try to fix regressions quickly once the culprit has been identified; fixes 52 for most regressions should be merged withi 49 for most regressions should be merged within two weeks, but some need to be 53 resolved within two or three days. 50 resolved within two or three days. 54 51 55 52 56 All the details on Linux kernel regressions re 53 All the details on Linux kernel regressions relevant for developers 57 ============================================== 54 =================================================================== 58 55 59 56 60 The important basics in more detail 57 The important basics in more detail 61 ----------------------------------- 58 ----------------------------------- 62 59 63 60 64 What to do when receiving regression reports 61 What to do when receiving regression reports 65 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 62 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 66 63 67 Ensure the Linux kernel's regression tracker a 64 Ensure the Linux kernel's regression tracker and others subscribers of the 68 `regression mailing list <https://lore.kernel. 65 `regression mailing list <https://lore.kernel.org/regressions/>`_ 69 (regressions@lists.linux.dev) become aware of 66 (regressions@lists.linux.dev) become aware of any newly reported regression: 70 67 71 * When you receive a report by mail that did 68 * When you receive a report by mail that did not CC the list, immediately bring 72 it into the loop by sending at least a brie 69 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 yo 70 try to ensure it gets CCed again in case you reply to a reply that omitted 74 the list. 71 the list. 75 72 76 * If a report submitted in a bug tracker hits 73 * If a report submitted in a bug tracker hits your Inbox, forward or bounce it 77 to the list. Consider checking the list arc 74 to the list. Consider checking the list archives beforehand, if the reporter 78 already forwarded the report as instructed 75 already forwarded the report as instructed by 79 Documentation/admin-guide/reporting-issues. 76 Documentation/admin-guide/reporting-issues.rst. 80 77 81 When doing either, consider making the Linux k 78 When doing either, consider making the Linux kernel regression tracking bot 82 "regzbot" immediately start tracking the issue 79 "regzbot" immediately start tracking the issue: 83 80 84 * For mailed reports, check if the reporter i 81 * For mailed reports, check if the reporter included a "regzbot command" like 85 ``#regzbot introduced: 1f2e3d4c5b6a``. If n !! 82 ``#regzbot introduced 1f2e3d4c5b6a``. If not, send a reply (with the 86 regressions list in CC) with a paragraph li 83 regressions list in CC) with a paragraph like the following::: 87 84 88 #regzbot ^introduced: v5.13..v5.14-rc1 85 #regzbot ^introduced: v5.13..v5.14-rc1 89 86 90 This tells regzbot the version range in whi 87 This tells regzbot the version range in which the issue started to happen; 91 you can specify a range using commit-ids as 88 you can specify a range using commit-ids as well or state a single commit-id 92 in case the reporter bisected the culprit. 89 in case the reporter bisected the culprit. 93 90 94 Note the caret (^) before the "introduced": 91 Note the caret (^) before the "introduced": it tells regzbot to treat the 95 parent mail (the one you reply to) as the i 92 parent mail (the one you reply to) as the initial report for the regression 96 you want to see tracked; that's important, 93 you want to see tracked; that's important, as regzbot will later look out 97 for patches with "Closes:" tags pointing to !! 94 for patches with "Link:" tags pointing to the report in the archives on 98 lore.kernel.org. 95 lore.kernel.org. 99 96 100 * When forwarding a regression reported to a !! 97 * When forwarding a regressions reported to a bug tracker, include a paragraph 101 with these regzbot commands:: 98 with these regzbot commands:: 102 99 103 #regzbot introduced: 1f2e3d4c5b6a 100 #regzbot introduced: 1f2e3d4c5b6a 104 #regzbot from: Some N. Ice Human <some.h 101 #regzbot from: Some N. Ice Human <some.human@example.com> 105 #regzbot monitor: http://some.bugtracke 102 #regzbot monitor: http://some.bugtracker.example.com/ticket?id=123456789 106 103 107 Regzbot will then automatically associate p 104 Regzbot will then automatically associate patches with the report that 108 contain "Closes:" tags pointing to your mai !! 105 contain "Link:" tags pointing to your mail or the mentioned ticket. 109 106 110 What's important when fixing regressions 107 What's important when fixing regressions 111 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 108 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 112 109 113 You don't need to do anything special when sub 110 You don't need to do anything special when submitting fixes for regression, just 114 remember to do what Documentation/process/subm 111 remember to do what Documentation/process/submitting-patches.rst, 115 :ref:`Documentation/process/5.Posting.rst <dev 112 :ref:`Documentation/process/5.Posting.rst <development_posting>`, and 116 Documentation/process/stable-kernel-rules.rst 113 Documentation/process/stable-kernel-rules.rst already explain in more detail: 117 114 118 * Point to all places where the issue was rep !! 115 * Point to all places where the issue was reported using "Link:" tags:: 119 116 120 Closes: https://lore.kernel.org/r/30th. !! 117 Link: https://lore.kernel.org/r/30th.anniversary.repost@klaava.Helsinki.FI/ 121 Closes: https://bugzilla.kernel.org/sho !! 118 Link: https://bugzilla.kernel.org/show_bug.cgi?id=1234567890 122 << 123 If you are only fixing part of the issue, y << 124 described in the first document mentioned a << 125 both of these equivalently and considers th << 126 119 127 * Add a "Fixes:" tag to specify the commit ca 120 * Add a "Fixes:" tag to specify the commit causing the regression. 128 121 129 * If the culprit was merged in an earlier dev 122 * If the culprit was merged in an earlier development cycle, explicitly mark 130 the fix for backporting using the ``Cc: sta 123 the fix for backporting using the ``Cc: stable@vger.kernel.org`` tag. 131 124 132 All this is expected from you and important wh 125 All this is expected from you and important when it comes to regression, as 133 these tags are of great value for everyone (yo 126 these tags are of great value for everyone (you included) that might be looking 134 into the issue weeks, months, or years later. 127 into the issue weeks, months, or years later. These tags are also crucial for 135 tools and scripts used by other kernel develop 128 tools and scripts used by other kernel developers or Linux distributions; one of 136 these tools is regzbot, which heavily relies o !! 129 these tools is regzbot, which heavily relies on the "Link:" tags to associate 137 reports for regression with changes resolving 130 reports for regression with changes resolving them. 138 131 139 Expectations and best practices for fixing reg !! 132 Prioritize work on fixing regressions 140 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !! 133 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 141 134 142 As a Linux kernel developer, you are expected !! 135 You should fix any reported regression as quickly as possible, to provide 143 situations where a regression caused by a rece !! 136 affected users with a solution in a timely manner and prevent more users from 144 only these options: !! 137 running into the issue; nevertheless developers need to take enough time and 145 !! 138 care to ensure regression fixes do not cause additional damage. 146 * Run a kernel with a regression that impacts !! 139 147 !! 140 In the end though, developers should give their best to prevent users from 148 * Switch to an older or newer kernel series. !! 141 running into situations where a regression leaves them only three options: "run 149 !! 142 a kernel with a regression that seriously impacts usage", "continue running an 150 * Continue running an outdated and thus poten !! 143 outdated and thus potentially insecure kernel version for more than two weeks 151 than three weeks after the regression's cul !! 144 after a regression's culprit was identified", and "downgrade to a still 152 should be less than two. And it ought to be !! 145 supported kernel series that lack required features". 153 severe or affects many users -- either in g !! 146 154 environments. !! 147 How to realize this depends a lot on the situation. Here are a few rules of 155 !! 148 thumb for you, in order or importance: 156 How to realize that in practice depends on var !! 149 157 rules of thumb as a guide. !! 150 * Prioritize work on handling regression reports and fixing regression over all 158 !! 151 other Linux kernel work, unless the latter concerns acute security issues or 159 In general: !! 152 bugs causing data loss or damage. 160 !! 153 161 * Prioritize work on regressions over all oth !! 154 * Always consider reverting the culprit commits and reapplying them later 162 latter concerns a severe issue (e.g. acute !! 155 together with necessary fixes, as this might be the least dangerous and 163 bricked hardware, ...). !! 156 quickest way to fix a regression. 164 !! 157 165 * Expedite fixing mainline regressions that r !! 158 * Developers should handle regressions in all supported kernel series, but are 166 mainline, stable, or longterm release (eith !! 159 free to delegate the work to the stable team, if the issue probably at no 167 !! 160 point in time occurred with mainline. 168 * Do not consider regressions from the curren !! 161 169 till the end of the cycle, as the issue mig !! 162 * Try to resolve any regressions introduced in the current development before 170 CI systems from testing mainline now or gen !! 163 its end. If you fear a fix might be too risky to apply only days before a new 171 !! 164 mainline release, let Linus decide: submit the fix separately to him as soon 172 * Work with the required care to avoid additi !! 165 as possible with the explanation of the situation. He then can make a call 173 resolving an issue then might take longer t !! 166 and postpone the release if necessary, for example if multiple such changes 174 !! 167 show up in his inbox. 175 On timing once the culprit of a regression is !! 168 176 !! 169 * Address regressions in stable, longterm, or proper mainline releases with 177 * Aim to mainline a fix within two or three d !! 170 more urgency than regressions in mainline pre-releases. That changes after 178 bothering many users -- either in general o !! 171 the release of the fifth pre-release, aka "-rc5": mainline then becomes as 179 particular hardware environment, distributi !! 172 important, to ensure all the improvements and fixes are ideally tested 180 !! 173 together for at least one week before Linus releases a new mainline version. 181 * Aim to mainline a fix by Sunday after the n !! 174 182 into a recent mainline, stable, or longterm !! 175 * Fix regressions within two or three days, if they are critical for some 183 backport); if the culprit became known earl !! 176 reason -- for example, if the issue is likely to affect many users of the 184 resolve, try to mainline the fix within the !! 177 kernel series in question on all or certain architectures. Note, this 185 !! 178 includes mainline, as issues like compile errors otherwise might prevent many 186 * For other regressions, aim to mainline fixe !! 179 testers or continuous integration systems from testing the series. 187 within the next three weeks. One or two Sun !! 180 188 regression is something people can live wit !! 181 * Aim to fix regressions within one week after the culprit was identified, if 189 mild performance regression. !! 182 the issue was introduced in either: 190 !! 183 191 * It's strongly discouraged to delay mainlini !! 184 * a recent stable/longterm release 192 merge window, except when the fix is extrao !! 185 193 culprit was mainlined more than a year ago. !! 186 * the development cycle of the latest proper mainline release 194 !! 187 195 On procedure: !! 188 In the latter case (say Linux v5.14), try to address regressions even 196 !! 189 quicker, if the stable series for the predecessor (v5.13) will be abandoned 197 * Always consider reverting the culprit, as i !! 190 soon or already was stamped "End-of-Life" (EOL) -- this usually happens about 198 dangerous way to fix a regression. Don't wo !! 191 three to four weeks after a new mainline release. 199 variant later: that should be straight-forw !! 192 200 through review once already. !! 193 * Try to fix all other regressions within two weeks after the culprit was 201 !! 194 found. Two or three additional weeks are acceptable for performance 202 * Try to resolve any regressions introduced i !! 195 regressions and other issues which are annoying, but don't prevent anyone 203 twelve months before the current developmen !! 196 from running Linux (unless it's an issue in the current development cycle, 204 regressions to be handled like those from t !! 197 as those should ideally be addressed before the release). A few weeks in 205 bears unusual risks. !! 198 total are acceptable if a regression can only be fixed with a risky change 206 !! 199 and at the same time is affecting only a few users; as much time is 207 * Consider CCing Linus on discussions or patc !! 200 also okay if the regression is already present in the second newest longterm 208 tangly. Do the same in precarious or urgent !! 201 kernel series. 209 subsystem maintainer might be unavailable. !! 202 210 know such a regression made it into a mainl !! 203 Note: The aforementioned time frames for resolving regressions are meant to 211 !! 204 include getting the fix tested, reviewed, and merged into mainline, ideally with 212 * For urgent regressions, consider asking Lin !! 205 the fix being in linux-next at least briefly. This leads to delays you need to 213 from the mailing list: he is totally fine w !! 206 account for. 214 fixes. Ideally though such requests should !! 207 215 subsystem maintainers or come directly from !! 208 Subsystem maintainers are expected to assist in reaching those periods by doing 216 !! 209 timely reviews and quick handling of accepted patches. They thus might have to 217 * In case you are unsure if a fix is worth th !! 210 send git-pull requests earlier or more often than usual; depending on the fix, 218 a new mainline release, send Linus a mail w !! 211 it might even be acceptable to skip testing in linux-next. Especially fixes for 219 CC; in it, summarize the situation while as !! 212 regressions in stable and longterm kernels need to be handled quickly, as fixes 220 the fix straight from the list. He then him !! 213 need to be merged in mainline before they can be backported to older series. 221 needed even postpone the release. Such requ << 222 in accordance with the subsystem maintainer << 223 << 224 Regarding stable and longterm kernels: << 225 << 226 * You are free to leave regressions to the st << 227 time occurred with mainline or were fixed t << 228 << 229 * If a regression made it into a proper mainl << 230 twelve months, ensure to tag the fix with " << 231 "Fixes:" tag alone does not guarantee a bac << 232 in case you know the culprit was backported << 233 << 234 * When receiving reports about regressions in << 235 series, please evaluate at least briefly if << 236 mainline as well -- and if that seems likel << 237 doubt, ask the reporter to check mainline. << 238 << 239 * Whenever you want to swiftly resolve a regr << 240 into a proper mainline, stable, or longterm << 241 mainline; when appropriate thus involve Lin << 242 above). That's because the stable team norm << 243 any changes that cause the same problems in << 244 << 245 * In case of urgent regression fixes you migh << 246 backporting by dropping the stable team a n << 247 this is especially advisable during merge w << 248 the fix otherwise might land at the end of << 249 << 250 On patch flow: << 251 << 252 * Developers, when trying to reach the time p << 253 to account for the time it takes to get fix << 254 Linus, ideally with them being in linux-nex << 255 fix is urgent, make it obvious to ensure ot << 256 << 257 * Reviewers, you are kindly asked to assist d << 258 periods mentioned above by reviewing regres << 259 << 260 * Subsystem maintainers, you likewise are enc << 261 of regression fixes. Thus evaluate if skipp << 262 the particular fix. Also consider sending g << 263 usual when needed. And try to avoid holding << 264 weekends -- especially when the fix is mark << 265 214 266 215 267 More aspects regarding regressions developers 216 More aspects regarding regressions developers should be aware of 268 ---------------------------------------------- 217 ---------------------------------------------------------------- 269 218 270 219 271 How to deal with changes where a risk of regre 220 How to deal with changes where a risk of regression is known 272 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 221 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 273 222 274 Evaluate how big the risk of regressions is, f 223 Evaluate how big the risk of regressions is, for example by performing a code 275 search in Linux distributions and Git forges. 224 search in Linux distributions and Git forges. Also consider asking other 276 developers or projects likely to be affected t 225 developers or projects likely to be affected to evaluate or even test the 277 proposed change; if problems surface, maybe so 226 proposed change; if problems surface, maybe some solution acceptable for all 278 can be found. 227 can be found. 279 228 280 If the risk of regressions in the end seems to 229 If the risk of regressions in the end seems to be relatively small, go ahead 281 with the change, but let all involved parties 230 with the change, but let all involved parties know about the risk. Hence, make 282 sure your patch description makes this aspect 231 sure your patch description makes this aspect obvious. Once the change is 283 merged, tell the Linux kernel's regression tra 232 merged, tell the Linux kernel's regression tracker and the regressions mailing 284 list about the risk, so everyone has the chang 233 list about the risk, so everyone has the change on the radar in case reports 285 trickle in. Depending on the risk, you also mi 234 trickle in. Depending on the risk, you also might want to ask the subsystem 286 maintainer to mention the issue in his mainlin 235 maintainer to mention the issue in his mainline pull request. 287 236 288 What else is there to known about regressions? 237 What else is there to known about regressions? 289 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 238 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 290 239 291 Check out Documentation/admin-guide/reporting- 240 Check out Documentation/admin-guide/reporting-regressions.rst, it covers a lot 292 of other aspects you want might want to be awa 241 of other aspects you want might want to be aware of: 293 242 294 * the purpose of the "no regressions" rule !! 243 * the purpose of the "no regressions rule" 295 244 296 * what issues actually qualify as regression 245 * what issues actually qualify as regression 297 246 298 * who's in charge for finding the root cause 247 * who's in charge for finding the root cause of a regression 299 248 300 * how to handle tricky situations, e.g. when 249 * how to handle tricky situations, e.g. when a regression is caused by a 301 security fix or when fixing a regression mi 250 security fix or when fixing a regression might cause another one 302 251 303 Whom to ask for advice when it comes to regres 252 Whom to ask for advice when it comes to regressions 304 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 253 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 305 254 306 Send a mail to the regressions mailing list (r 255 Send a mail to the regressions mailing list (regressions@lists.linux.dev) while 307 CCing the Linux kernel's regression tracker (r 256 CCing the Linux kernel's regression tracker (regressions@leemhuis.info); if the 308 issue might better be dealt with in private, f 257 issue might better be dealt with in private, feel free to omit the list. 309 258 310 259 311 More about regression tracking and regzbot 260 More about regression tracking and regzbot 312 ------------------------------------------ 261 ------------------------------------------ 313 262 314 263 315 Why the Linux kernel has a regression tracker, 264 Why the Linux kernel has a regression tracker, and why is regzbot used? 316 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 265 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 317 266 318 Rules like "no regressions" need someone to en 267 Rules like "no regressions" need someone to ensure they are followed, otherwise 319 they are broken either accidentally or on purp 268 they are broken either accidentally or on purpose. History has shown this to be 320 true for the Linux kernel as well. That's why 269 true for the Linux kernel as well. That's why Thorsten Leemhuis volunteered to 321 keep an eye on things as the Linux kernel's re 270 keep an eye on things as the Linux kernel's regression tracker, who's 322 occasionally helped by other people. Neither o 271 occasionally helped by other people. Neither of them are paid to do this, 323 that's why regression tracking is done on a be 272 that's why regression tracking is done on a best effort basis. 324 273 325 Earlier attempts to manually track regressions 274 Earlier attempts to manually track regressions have shown it's an exhausting and 326 frustrating work, which is why they were aband 275 frustrating work, which is why they were abandoned after a while. To prevent 327 this from happening again, Thorsten developed 276 this from happening again, Thorsten developed regzbot to facilitate the work, 328 with the long term goal to automate regression 277 with the long term goal to automate regression tracking as much as possible for 329 everyone involved. 278 everyone involved. 330 279 331 How does regression tracking work with regzbot 280 How does regression tracking work with regzbot? 332 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 281 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 333 282 334 The bot watches for replies to reports of trac 283 The bot watches for replies to reports of tracked regressions. Additionally, 335 it's looking out for posted or committed patch 284 it's looking out for posted or committed patches referencing such reports 336 with "Closes:" tags; replies to such patch pos !! 285 with "Link:" tags; replies to such patch postings are tracked as well. 337 Combined this data provides good insights into 286 Combined this data provides good insights into the current state of the fixing 338 process. 287 process. 339 288 340 Regzbot tries to do its job with as little ove 289 Regzbot tries to do its job with as little overhead as possible for both 341 reporters and developers. In fact, only report 290 reporters and developers. In fact, only reporters are burdened with an extra 342 duty: they need to tell regzbot about the regr 291 duty: they need to tell regzbot about the regression report using the ``#regzbot 343 introduced`` command outlined above; if they d 292 introduced`` command outlined above; if they don't do that, someone else can 344 take care of that using ``#regzbot ^introduced 293 take care of that using ``#regzbot ^introduced``. 345 294 346 For developers there normally is no extra work 295 For developers there normally is no extra work involved, they just need to make 347 sure to do something that was expected long be 296 sure to do something that was expected long before regzbot came to light: add 348 links to the patch description pointing to all !! 297 "Link:" tags to the patch description pointing to all reports about the issue >> 298 fixed. 349 299 350 Do I have to use regzbot? 300 Do I have to use regzbot? 351 ~~~~~~~~~~~~~~~~~~~~~~~~~ 301 ~~~~~~~~~~~~~~~~~~~~~~~~~ 352 302 353 It's in the interest of everyone if you do, as 303 It's in the interest of everyone if you do, as kernel maintainers like Linus 354 Torvalds partly rely on regzbot's tracking in 304 Torvalds partly rely on regzbot's tracking in their work -- for example when 355 deciding to release a new version or extend th 305 deciding to release a new version or extend the development phase. For this they 356 need to be aware of all unfixed regression; to 306 need to be aware of all unfixed regression; to do that, Linus is known to look 357 into the weekly reports sent by regzbot. 307 into the weekly reports sent by regzbot. 358 308 359 Do I have to tell regzbot about every regressi 309 Do I have to tell regzbot about every regression I stumble upon? 360 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 310 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 361 311 362 Ideally yes: we are all humans and easily forg 312 Ideally yes: we are all humans and easily forget problems when something more 363 important unexpectedly comes up -- for example 313 important unexpectedly comes up -- for example a bigger problem in the Linux 364 kernel or something in real life that's keepin 314 kernel or something in real life that's keeping us away from keyboards for a 365 while. Hence, it's best to tell regzbot about 315 while. Hence, it's best to tell regzbot about every regression, except when you 366 immediately write a fix and commit it to a tre 316 immediately write a fix and commit it to a tree regularly merged to the affected 367 kernel series. 317 kernel series. 368 318 369 How to see which regressions regzbot tracks cu 319 How to see which regressions regzbot tracks currently? 370 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 320 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 371 321 372 Check `regzbot's web-interface <https://linux- 322 Check `regzbot's web-interface <https://linux-regtracking.leemhuis.info/regzbot/>`_ 373 for the latest info; alternatively, `search fo 323 for the latest info; alternatively, `search for the latest regression report 374 <https://lore.kernel.org/lkml/?q=%22Linux+regr 324 <https://lore.kernel.org/lkml/?q=%22Linux+regressions+report%22+f%3Aregzbot>`_, 375 which regzbot normally sends out once a week o 325 which regzbot normally sends out once a week on Sunday evening (UTC), which is a 376 few hours before Linus usually publishes new ( 326 few hours before Linus usually publishes new (pre-)releases. 377 327 378 What places is regzbot monitoring? 328 What places is regzbot monitoring? 379 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 329 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 380 330 381 Regzbot is watching the most important Linux m 331 Regzbot is watching the most important Linux mailing lists as well as the git 382 repositories of linux-next, mainline, and stab 332 repositories of linux-next, mainline, and stable/longterm. 383 333 384 What kind of issues are supposed to be tracked 334 What kind of issues are supposed to be tracked by regzbot? 385 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 335 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 386 336 387 The bot is meant to track regressions, hence p 337 The bot is meant to track regressions, hence please don't involve regzbot for 388 regular issues. But it's okay for the Linux ke 338 regular issues. But it's okay for the Linux kernel's regression tracker if you 389 use regzbot to track severe issues, like repor 339 use regzbot to track severe issues, like reports about hangs, corrupted data, 390 or internal errors (Panic, Oops, BUG(), warnin 340 or internal errors (Panic, Oops, BUG(), warning, ...). 391 341 392 Can I add regressions found by CI systems to r 342 Can I add regressions found by CI systems to regzbot's tracking? 393 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 343 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 394 344 395 Feel free to do so, if the particular regressi 345 Feel free to do so, if the particular regression likely has impact on practical 396 use cases and thus might be noticed by users; 346 use cases and thus might be noticed by users; hence, please don't involve 397 regzbot for theoretical regressions unlikely t 347 regzbot for theoretical regressions unlikely to show themselves in real world 398 usage. 348 usage. 399 349 400 How to interact with regzbot? 350 How to interact with regzbot? 401 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 351 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 402 352 403 By using a 'regzbot command' in a direct or in 353 By using a 'regzbot command' in a direct or indirect reply to the mail with the 404 regression report. These commands need to be i 354 regression report. These commands need to be in their own paragraph (IOW: they 405 need to be separated from the rest of the mail 355 need to be separated from the rest of the mail using blank lines). 406 356 407 One such command is ``#regzbot introduced: <ve !! 357 One such command is ``#regzbot introduced <version or commit>``, which makes 408 regzbot consider your mail as a regressions re 358 regzbot consider your mail as a regressions report added to the tracking, as 409 already described above; ``#regzbot ^introduce !! 359 already described above; ``#regzbot ^introduced <version or commit>`` is another 410 such command, which makes regzbot consider the 360 such command, which makes regzbot consider the parent mail as a report for a 411 regression which it starts to track. 361 regression which it starts to track. 412 362 413 Once one of those two commands has been utiliz 363 Once one of those two commands has been utilized, other regzbot commands can be 414 used in direct or indirect replies to the repo 364 used in direct or indirect replies to the report. You can write them below one 415 of the `introduced` commands or in replies to 365 of the `introduced` commands or in replies to the mail that used one of them 416 or itself is a reply to that mail: 366 or itself is a reply to that mail: 417 367 418 * Set or update the title:: 368 * Set or update the title:: 419 369 420 #regzbot title: foo 370 #regzbot title: foo 421 371 422 * Monitor a discussion or bugzilla.kernel.org 372 * Monitor a discussion or bugzilla.kernel.org ticket where additions aspects of 423 the issue or a fix are discussed -- for exa 373 the issue or a fix are discussed -- for example the posting of a patch fixing 424 the regression:: 374 the regression:: 425 375 426 #regzbot monitor: https://lore.kernel.o 376 #regzbot monitor: https://lore.kernel.org/all/30th.anniversary.repost@klaava.Helsinki.FI/ 427 377 428 Monitoring only works for lore.kernel.org a 378 Monitoring only works for lore.kernel.org and bugzilla.kernel.org; regzbot 429 will consider all messages in that thread o 379 will consider all messages in that thread or ticket as related to the fixing 430 process. 380 process. 431 381 432 * Point to a place with further details of in 382 * Point to a place with further details of interest, like a mailing list post 433 or a ticket in a bug tracker that are sligh 383 or a ticket in a bug tracker that are slightly related, but about a different 434 topic:: 384 topic:: 435 385 436 #regzbot link: https://bugzilla.kernel. 386 #regzbot link: https://bugzilla.kernel.org/show_bug.cgi?id=123456789 437 387 438 * Mark a regression as fixed by a commit that 388 * Mark a regression as fixed by a commit that is heading upstream or already 439 landed:: 389 landed:: 440 390 441 #regzbot fix: 1f2e3d4c5d !! 391 #regzbot fixed-by: 1f2e3d4c5d 442 392 443 * Mark a regression as a duplicate of another 393 * Mark a regression as a duplicate of another one already tracked by regzbot:: 444 394 445 #regzbot dup-of: https://lore.kernel.or 395 #regzbot dup-of: https://lore.kernel.org/all/30th.anniversary.repost@klaava.Helsinki.FI/ 446 396 447 * Mark a regression as invalid:: 397 * Mark a regression as invalid:: 448 398 449 #regzbot invalid: wasn't a regression, 399 #regzbot invalid: wasn't a regression, problem has always existed 450 400 451 Is there more to tell about regzbot and its co 401 Is there more to tell about regzbot and its commands? 452 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 402 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 453 403 454 More detailed and up-to-date information about 404 More detailed and up-to-date information about the Linux 455 kernel's regression tracking bot can be found 405 kernel's regression tracking bot can be found on its 456 `project page <https://gitlab.com/knurd42/regz 406 `project page <https://gitlab.com/knurd42/regzbot>`_, which among others 457 contains a `getting started guide <https://git 407 contains a `getting started guide <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/getting_started.md>`_ 458 and `reference documentation <https://gitlab.c 408 and `reference documentation <https://gitlab.com/knurd42/regzbot/-/blob/main/docs/reference.md>`_ 459 which both cover more details than the above s 409 which both cover more details than the above section. 460 410 461 Quotes from Linus about regression 411 Quotes from Linus about regression 462 ---------------------------------- 412 ---------------------------------- 463 413 464 Find below a few real life examples of how Lin 414 Find below a few real life examples of how Linus Torvalds expects regressions to 465 be handled: 415 be handled: 466 416 467 * From `2017-10-26 (1/2) 417 * From `2017-10-26 (1/2) 468 <https://lore.kernel.org/lkml/CA+55aFwiiQYJ+ 418 <https://lore.kernel.org/lkml/CA+55aFwiiQYJ+YoLKCXjN_beDVfu38mg=Ggg5LFOcqHE8Qi7Zw@mail.gmail.com/">https://lore.kernel.org/lkml/CA+55aFwiiQYJ+YoLKCXjN_beDVfu38mg=Ggg5LFOcqHE8Qi7Zw@mail.gmail.com/>`_:: 469 419 470 If you break existing user space setups 420 If you break existing user space setups THAT IS A REGRESSION. 471 421 472 It's not ok to say "but we'll fix the u 422 It's not ok to say "but we'll fix the user space setup". 473 423 474 Really. NOT OK. 424 Really. NOT OK. 475 425 476 [...] 426 [...] 477 427 478 The first rule is: 428 The first rule is: 479 429 480 - we don't cause regressions 430 - we don't cause regressions 481 431 482 and the corollary is that when regressi 432 and the corollary is that when regressions *do* occur, we admit to 483 them and fix them, instead of blaming u 433 them and fix them, instead of blaming user space. 484 434 485 The fact that you have apparently been 435 The fact that you have apparently been denying the regression now for 486 three weeks means that I will revert, a 436 three weeks means that I will revert, and I will stop pulling apparmor 487 requests until the people involved unde 437 requests until the people involved understand how kernel development 488 is done. 438 is done. 489 439 490 * From `2017-10-26 (2/2) 440 * From `2017-10-26 (2/2) 491 <https://lore.kernel.org/lkml/CA+55aFxW7NMAM 441 <https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/">https://lore.kernel.org/lkml/CA+55aFxW7NMAMvYhkvz1UPbUTUJewRt6Yb51QAx5RtrWOwjebg@mail.gmail.com/>`_:: 492 442 493 People should basically always feel lik 443 People should basically always feel like they can update their kernel 494 and simply not have to worry about it. 444 and simply not have to worry about it. 495 445 496 I refuse to introduce "you can only upd 446 I refuse to introduce "you can only update the kernel if you also 497 update that other program" kind of limi 447 update that other program" kind of limitations. If the kernel used to 498 work for you, the rule is that it conti 448 work for you, the rule is that it continues to work for you. 499 449 500 There have been exceptions, but they ar 450 There have been exceptions, but they are few and far between, and they 501 generally have some major and fundament 451 generally have some major and fundamental reasons for having happened, 502 that were basically entirely unavoidabl 452 that were basically entirely unavoidable, and people _tried_hard_ to 503 avoid them. Maybe we can't practically 453 avoid them. Maybe we can't practically support the hardware any more 504 after it is decades old and nobody uses 454 after it is decades old and nobody uses it with modern kernels any 505 more. Maybe there's a serious security 455 more. Maybe there's a serious security issue with how we did things, 506 and people actually depended on that fu 456 and people actually depended on that fundamentally broken model. Maybe 507 there was some fundamental other breaka 457 there was some fundamental other breakage that just _had_ to have a 508 flag day for very core and fundamental 458 flag day for very core and fundamental reasons. 509 459 510 And notice that this is very much about 460 And notice that this is very much about *breaking* peoples environments. 511 461 512 Behavioral changes happen, and maybe we 462 Behavioral changes happen, and maybe we don't even support some 513 feature any more. There's a number of f 463 feature any more. There's a number of fields in /proc/<pid>/stat that 514 are printed out as zeroes, simply becau 464 are printed out as zeroes, simply because they don't even *exist* in 515 the kernel any more, or because showing 465 the kernel any more, or because showing them was a mistake (typically 516 an information leak). But the numbers g 466 an information leak). But the numbers got replaced by zeroes, so that 517 the code that used to parse the fields 467 the code that used to parse the fields still works. The user might not 518 see everything they used to see, and so 468 see everything they used to see, and so behavior is clearly different, 519 but things still _work_, even if they m 469 but things still _work_, even if they might no longer show sensitive 520 (or no longer relevant) information. 470 (or no longer relevant) information. 521 471 522 But if something actually breaks, then 472 But if something actually breaks, then the change must get fixed or 523 reverted. And it gets fixed in the *ker 473 reverted. And it gets fixed in the *kernel*. Not by saying "well, fix 524 your user space then". It was a kernel 474 your user space then". It was a kernel change that exposed the 525 problem, it needs to be the kernel that 475 problem, it needs to be the kernel that corrects for it, because we 526 have a "upgrade in place" model. We don 476 have a "upgrade in place" model. We don't have a "upgrade with new 527 user space". 477 user space". 528 478 529 And I seriously will refuse to take cod 479 And I seriously will refuse to take code from people who do not 530 understand and honor this very simple r 480 understand and honor this very simple rule. 531 481 532 This rule is also not going to change. 482 This rule is also not going to change. 533 483 534 And yes, I realize that the kernel is " 484 And yes, I realize that the kernel is "special" in this respect. I'm 535 proud of it. 485 proud of it. 536 486 537 I have seen, and can point to, lots of 487 I have seen, and can point to, lots of projects that go "We need to 538 break that use case in order to make pr 488 break that use case in order to make progress" or "you relied on 539 undocumented behavior, it sucks to be y 489 undocumented behavior, it sucks to be you" or "there's a better way to 540 do what you want to do, and you have to 490 do what you want to do, and you have to change to that new better 541 way", and I simply don't think that's a 491 way", and I simply don't think that's acceptable outside of very early 542 alpha releases that have experimental u 492 alpha releases that have experimental users that know what they signed 543 up for. The kernel hasn't been in that 493 up for. The kernel hasn't been in that situation for the last two 544 decades. 494 decades. 545 495 546 We do API breakage _inside_ the kernel 496 We do API breakage _inside_ the kernel all the time. We will fix 547 internal problems by saying "you now ne 497 internal problems by saying "you now need to do XYZ", but then it's 548 about internal kernel API's, and the pe 498 about internal kernel API's, and the people who do that then also 549 obviously have to fix up all the in-ker 499 obviously have to fix up all the in-kernel users of that API. Nobody 550 can say "I now broke the API you used, 500 can say "I now broke the API you used, and now _you_ need to fix it 551 up". Whoever broke something gets to fi 501 up". Whoever broke something gets to fix it too. 552 502 553 And we simply do not break user space. 503 And we simply do not break user space. 554 504 555 * From `2020-05-21 505 * From `2020-05-21 556 <https://lore.kernel.org/all/CAHk-=wiVi7mSrs 506 <https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/">https://lore.kernel.org/all/CAHk-=wiVi7mSrsMP=fLXQrXK_UimybW=ziLOwSzFTtoXUacWVQ@mail.gmail.com/>`_:: 557 507 558 The rules about regressions have never 508 The rules about regressions have never been about any kind of 559 documented behavior, or where the code 509 documented behavior, or where the code lives. 560 510 561 The rules about regressions are always 511 The rules about regressions are always about "breaks user workflow". 562 512 563 Users are literally the _only_ thing th 513 Users are literally the _only_ thing that matters. 564 514 565 No amount of "you shouldn't have used t 515 No amount of "you shouldn't have used this" or "that behavior was 566 undefined, it's your own fault your app 516 undefined, it's your own fault your app broke" or "that used to work 567 simply because of a kernel bug" is at a 517 simply because of a kernel bug" is at all relevant. 568 518 569 Now, reality is never entirely black-an 519 Now, reality is never entirely black-and-white. So we've had things 570 like "serious security issue" etc that 520 like "serious security issue" etc that just forces us to make changes 571 that may break user space. But even the 521 that may break user space. But even then the rule is that we don't 572 really have other options that would al 522 really have other options that would allow things to continue. 573 523 574 And obviously, if users take years to e 524 And obviously, if users take years to even notice that something 575 broke, or if we have sane ways to work 525 broke, or if we have sane ways to work around the breakage that 576 doesn't make for too much trouble for u 526 doesn't make for too much trouble for users (ie "ok, there are a 577 handful of users, and they can use a ke 527 handful of users, and they can use a kernel command line to work 578 around it" kind of things) we've also b 528 around it" kind of things) we've also been a bit less strict. 579 529 580 But no, "that was documented to be brok 530 But no, "that was documented to be broken" (whether it's because the 581 code was in staging or because the man- 531 code was in staging or because the man-page said something else) is 582 irrelevant. If staging code is so usefu 532 irrelevant. If staging code is so useful that people end up using it, 583 that means that it's basically regular 533 that means that it's basically regular kernel code with a flag saying 584 "please clean this up". 534 "please clean this up". 585 535 586 The other side of the coin is that peop 536 The other side of the coin is that people who talk about "API 587 stability" are entirely wrong. API's do 537 stability" are entirely wrong. API's don't matter either. You can make 588 any changes to an API you like - as lon 538 any changes to an API you like - as long as nobody notices. 589 539 590 Again, the regression rule is not about 540 Again, the regression rule is not about documentation, not about 591 API's, and not about the phase of the m 541 API's, and not about the phase of the moon. 592 542 593 It's entirely about "we caused problems 543 It's entirely about "we caused problems for user space that used to work". 594 544 595 * From `2017-11-05 545 * From `2017-11-05 596 <https://lore.kernel.org/all/CA+55aFzUvbGjD8 546 <https://lore.kernel.org/all/CA+55aFzUvbGjD8nQ-+3oiMBx14c_6zOj2n7KLN3UsJ-qsd4Dcw@mail.gmail.com/">https://lore.kernel.org/all/CA+55aFzUvbGjD8nQ-+3oiMBx14c_6zOj2n7KLN3UsJ-qsd4Dcw@mail.gmail.com/>`_:: 597 547 598 And our regression rule has never been 548 And our regression rule has never been "behavior doesn't change". 599 That would mean that we could never mak 549 That would mean that we could never make any changes at all. 600 550 601 For example, we do things like add new 551 For example, we do things like add new error handling etc all the 602 time, which we then sometimes even add 552 time, which we then sometimes even add tests for in our kselftest 603 directory. 553 directory. 604 554 605 So clearly behavior changes all the tim 555 So clearly behavior changes all the time and we don't consider that a 606 regression per se. 556 regression per se. 607 557 608 The rule for a regression for the kerne 558 The rule for a regression for the kernel is that some real user 609 workflow breaks. Not some test. Not a " 559 workflow breaks. Not some test. Not a "look, I used to be able to do 610 X, now I can't". 560 X, now I can't". 611 561 612 * From `2018-08-03 562 * From `2018-08-03 613 <https://lore.kernel.org/all/CA+55aFwWZX=CXm 563 <https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/">https://lore.kernel.org/all/CA+55aFwWZX=CXmWDTkDGb36kf12XmTehmQjbiMPCqCRG2hi9kw@mail.gmail.com/>`_:: 614 564 615 YOU ARE MISSING THE #1 KERNEL RULE. 565 YOU ARE MISSING THE #1 KERNEL RULE. 616 566 617 We do not regress, and we do not regres 567 We do not regress, and we do not regress exactly because your are 100% wrong. 618 568 619 And the reason you state for your opini 569 And the reason you state for your opinion is in fact exactly *WHY* you 620 are wrong. 570 are wrong. 621 571 622 Your "good reasons" are pure and utter 572 Your "good reasons" are pure and utter garbage. 623 573 624 The whole point of "we do not regress" 574 The whole point of "we do not regress" is so that people can upgrade 625 the kernel and never have to worry abou 575 the kernel and never have to worry about it. 626 576 627 > Kernel had a bug which has been fixed 577 > Kernel had a bug which has been fixed 628 578 629 That is *ENTIRELY* immaterial. 579 That is *ENTIRELY* immaterial. 630 580 631 Guys, whether something was buggy or no 581 Guys, whether something was buggy or not DOES NOT MATTER. 632 582 633 Why? 583 Why? 634 584 635 Bugs happen. That's a fact of life. Arg 585 Bugs happen. That's a fact of life. Arguing that "we had to break 636 something because we were fixing a bug" 586 something because we were fixing a bug" is completely insane. We fix 637 tens of bugs every single day, thinking 587 tens of bugs every single day, thinking that "fixing a bug" means that 638 we can break something is simply NOT TR 588 we can break something is simply NOT TRUE. 639 589 640 So bugs simply aren't even relevant to 590 So bugs simply aren't even relevant to the discussion. They happen, 641 they get found, they get fixed, and it 591 they get found, they get fixed, and it has nothing to do with "we 642 break users". 592 break users". 643 593 644 Because the only thing that matters IS 594 Because the only thing that matters IS THE USER. 645 595 646 How hard is that to understand? 596 How hard is that to understand? 647 597 648 Anybody who uses "but it was buggy" as 598 Anybody who uses "but it was buggy" as an argument is entirely missing 649 the point. As far as the USER was conce 599 the point. As far as the USER was concerned, it wasn't buggy - it 650 worked for him/her. 600 worked for him/her. 651 601 652 Maybe it worked *because* the user had 602 Maybe it worked *because* the user had taken the bug into account, 653 maybe it worked because the user didn't 603 maybe it worked because the user didn't notice - again, it doesn't 654 matter. It worked for the user. 604 matter. It worked for the user. 655 605 656 Breaking a user workflow for a "bug" is 606 Breaking a user workflow for a "bug" is absolutely the WORST reason 657 for breakage you can imagine. 607 for breakage you can imagine. 658 608 659 It's basically saying "I took something 609 It's basically saying "I took something that worked, and I broke it, 660 but now it's better". Do you not see ho 610 but now it's better". Do you not see how f*cking insane that statement 661 is? 611 is? 662 612 663 And without users, your program is not 613 And without users, your program is not a program, it's a pointless 664 piece of code that you might as well th 614 piece of code that you might as well throw away. 665 615 666 Seriously. This is *why* the #1 rule fo 616 Seriously. This is *why* the #1 rule for kernel development is "we 667 don't break users". Because "I fixed a 617 don't break users". Because "I fixed a bug" is absolutely NOT AN 668 ARGUMENT if that bug fix broke a user s 618 ARGUMENT if that bug fix broke a user setup. You actually introduced a 669 MUCH BIGGER bug by "fixing" something t 619 MUCH BIGGER bug by "fixing" something that the user clearly didn't 670 even care about. 620 even care about. 671 621 672 And dammit, we upgrade the kernel ALL T 622 And dammit, we upgrade the kernel ALL THE TIME without upgrading any 673 other programs at all. It is absolutely 623 other programs at all. It is absolutely required, because flag-days 674 and dependencies are horribly bad. 624 and dependencies are horribly bad. 675 625 676 And it is also required simply because 626 And it is also required simply because I as a kernel developer do not 677 upgrade random other tools that I don't 627 upgrade random other tools that I don't even care about as I develop 678 the kernel, and I want any of my users 628 the kernel, and I want any of my users to feel safe doing the same 679 time. 629 time. 680 630 681 So no. Your rule is COMPLETELY wrong. I 631 So no. Your rule is COMPLETELY wrong. If you cannot upgrade a kernel 682 without upgrading some other random bin 632 without upgrading some other random binary, then we have a problem. 683 633 684 * From `2021-06-05 634 * From `2021-06-05 685 <https://lore.kernel.org/all/CAHk-=wiUVqHN76 635 <https://lore.kernel.org/all/CAHk-=wiUVqHN76YUwhkjZzwTdjMMJf_zN4+u7vEJjmEGh3recw@mail.gmail.com/">https://lore.kernel.org/all/CAHk-=wiUVqHN76YUwhkjZzwTdjMMJf_zN4+u7vEJjmEGh3recw@mail.gmail.com/>`_:: 686 636 687 THERE ARE NO VALID ARGUMENTS FOR REGRES 637 THERE ARE NO VALID ARGUMENTS FOR REGRESSIONS. 688 638 689 Honestly, security people need to under 639 Honestly, security people need to understand that "not working" is not 690 a success case of security. It's a fail 640 a success case of security. It's a failure case. 691 641 692 Yes, "not working" may be secure. But s 642 Yes, "not working" may be secure. But security in that case is *pointless*. 693 643 694 * From `2011-05-06 (1/3) 644 * From `2011-05-06 (1/3) 695 <https://lore.kernel.org/all/BANLkTim9YvResB 645 <https://lore.kernel.org/all/BANLkTim9YvResB+PwRp7QTK-a5VNg2PvmQ@mail.gmail.com/">https://lore.kernel.org/all/BANLkTim9YvResB+PwRp7QTK-a5VNg2PvmQ@mail.gmail.com/>`_:: 696 646 697 Binary compatibility is more important. 647 Binary compatibility is more important. 698 648 699 And if binaries don't use the interface 649 And if binaries don't use the interface to parse the format (or just 700 parse it wrongly - see the fairly recen 650 parse it wrongly - see the fairly recent example of adding uuid's to 701 /proc/self/mountinfo), then it's a regr 651 /proc/self/mountinfo), then it's a regression. 702 652 703 And regressions get reverted, unless th 653 And regressions get reverted, unless there are security issues or 704 similar that makes us go "Oh Gods, we r 654 similar that makes us go "Oh Gods, we really have to break things". 705 655 706 I don't understand why this simple logi 656 I don't understand why this simple logic is so hard for some kernel 707 developers to understand. Reality matte 657 developers to understand. Reality matters. Your personal wishes matter 708 NOT AT ALL. 658 NOT AT ALL. 709 659 710 If you made an interface that can be us 660 If you made an interface that can be used without parsing the 711 interface description, then we're stuck 661 interface description, then we're stuck with the interface. Theory 712 simply doesn't matter. 662 simply doesn't matter. 713 663 714 You could help fix the tools, and try t 664 You could help fix the tools, and try to avoid the compatibility 715 issues that way. There aren't that many 665 issues that way. There aren't that many of them. 716 666 717 From `2011-05-06 (2/3) 667 From `2011-05-06 (2/3) 718 <https://lore.kernel.org/all/BANLkTi=KVXjKR8 668 <https://lore.kernel.org/all/BANLkTi=KVXjKR82sqsz4gwjr+E0vtqCmvA@mail.gmail.com/">https://lore.kernel.org/all/BANLkTi=KVXjKR82sqsz4gwjr+E0vtqCmvA@mail.gmail.com/>`_:: 719 669 720 it's clearly NOT an internal tracepoint 670 it's clearly NOT an internal tracepoint. By definition. It's being 721 used by powertop. 671 used by powertop. 722 672 723 From `2011-05-06 (3/3) 673 From `2011-05-06 (3/3) 724 <https://lore.kernel.org/all/BANLkTinazaXRdG 674 <https://lore.kernel.org/all/BANLkTinazaXRdGovYL7rRVp+j6HbJ7pzhg@mail.gmail.com/">https://lore.kernel.org/all/BANLkTinazaXRdGovYL7rRVp+j6HbJ7pzhg@mail.gmail.com/>`_:: 725 675 726 We have programs that use that ABI and 676 We have programs that use that ABI and thus it's a regression if they break. 727 677 728 * From `2012-07-06 <https://lore.kernel.org/al 678 * From `2012-07-06 <https://lore.kernel.org/all/CA+55aFwnLJ+0sjx92EGREGTWOx84wwKaraSzpTNJwPVV8edw8g@mail.gmail.com/">https://lore.kernel.org/all/CA+55aFwnLJ+0sjx92EGREGTWOx84wwKaraSzpTNJwPVV8edw8g@mail.gmail.com/>`_:: 729 679 730 > Now this got me wondering if Debian _ 680 > Now this got me wondering if Debian _unstable_ actually qualifies as a 731 > standard distro userspace. 681 > standard distro userspace. 732 682 733 Oh, if the kernel breaks some standard 683 Oh, if the kernel breaks some standard user space, that counts. Tons 734 of people run Debian unstable 684 of people run Debian unstable 735 685 736 * From `2019-09-15 686 * From `2019-09-15 737 <https://lore.kernel.org/lkml/CAHk-=wiP4K8DR 687 <https://lore.kernel.org/lkml/CAHk-=wiP4K8DRJWsCo=20hn_6054xBamGKF2kPgUzpB5aMaofA@mail.gmail.com/">https://lore.kernel.org/lkml/CAHk-=wiP4K8DRJWsCo=20hn_6054xBamGKF2kPgUzpB5aMaofA@mail.gmail.com/>`_:: 738 688 739 One _particularly_ last-minute revert i 689 One _particularly_ last-minute revert is the top-most commit (ignoring 740 the version change itself) done just be 690 the version change itself) done just before the release, and while 741 it's very annoying, it's perhaps also i 691 it's very annoying, it's perhaps also instructive. 742 692 743 What's instructive about it is that I r 693 What's instructive about it is that I reverted a commit that wasn't 744 actually buggy. In fact, it was doing e 694 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 695 and did it very well. In fact it did it _so_ well that the much 746 improved IO patterns it caused then end 696 improved IO patterns it caused then ended up revealing a user-visible 747 regression due to a real bug in a compl 697 regression due to a real bug in a completely unrelated area. 748 698 749 The actual details of that regression a 699 The actual details of that regression are not the reason I point that 750 revert out as instructive, though. It's 700 revert out as instructive, though. It's more that it's an instructive 751 example of what counts as a regression, 701 example of what counts as a regression, and what the whole "no 752 regressions" kernel rule means. The rev 702 regressions" kernel rule means. The reverted commit didn't change any 753 API's, and it didn't introduce any new 703 API's, and it didn't introduce any new bugs. But it ended up exposing 754 another problem, and as such caused a k 704 another problem, and as such caused a kernel upgrade to fail for a 755 user. So it got reverted. 705 user. So it got reverted. 756 706 757 The point here being that we revert bas 707 The point here being that we revert based on user-reported _behavior_, 758 not based on some "it changes the ABI" 708 not based on some "it changes the ABI" or "it caused a bug" concept. 759 The problem was really pre-existing, an 709 The problem was really pre-existing, and it just didn't happen to 760 trigger before. The better IO patterns 710 trigger before. The better IO patterns introduced by the change just 761 happened to expose an old bug, and peop 711 happened to expose an old bug, and people had grown to depend on the 762 previously benign behavior of that old 712 previously benign behavior of that old issue. 763 713 764 And never fear, we'll re-introduce the 714 And never fear, we'll re-introduce the fix that improved on the IO 765 patterns once we've decided just how to 715 patterns once we've decided just how to handle the fact that we had a 766 bad interaction with an interface that 716 bad interaction with an interface that people had then just happened 767 to rely on incidental behavior for befo 717 to rely on incidental behavior for before. It's just that we'll have 768 to hash through how to do that (there a 718 to hash through how to do that (there are no less than three different 769 patches by three different developers b 719 patches by three different developers being discussed, and there might 770 be more coming...). In the meantime, I 720 be more coming...). In the meantime, I reverted the thing that exposed 771 the problem to users for this release, 721 the problem to users for this release, even if I hope it will be 772 re-introduced (perhaps even backported 722 re-introduced (perhaps even backported as a stable patch) once we have 773 consensus about the issue it exposed. 723 consensus about the issue it exposed. 774 724 775 Take-away from the whole thing: it's no 725 Take-away from the whole thing: it's not about whether you change the 776 kernel-userspace ABI, or fix a bug, or 726 kernel-userspace ABI, or fix a bug, or about whether the old code 777 "should never have worked in the first 727 "should never have worked in the first place". It's about whether 778 something breaks existing users' workfl 728 something breaks existing users' workflow. 779 729 780 Anyway, that was my little aside on the 730 Anyway, that was my little aside on the whole regression thing. Since 781 it's that "first rule of kernel program 731 it's that "first rule of kernel programming", I felt it is perhaps 782 worth just bringing it up every once in 732 worth just bringing it up every once in a while 783 733 784 .. 734 .. 785 end-of-content 735 end-of-content 786 .. 736 .. 787 This text is available under GPL-2.0+ or CC 737 This text is available under GPL-2.0+ or CC-BY-4.0, as stated at the top 788 of the file. If you want to distribute this 738 of the file. If you want to distribute this text under CC-BY-4.0 only, 789 please use "The Linux kernel developers" fo 739 please use "The Linux kernel developers" for author attribution and link 790 this as source: 740 this as source: 791 https://git.kernel.org/pub/scm/linux/kernel 741 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/plain/Documentation/process/handling-regressions.rst 792 .. 742 .. 793 Note: Only the content of this RST file as 743 Note: Only the content of this RST file as found in the Linux kernel sources 794 is available under CC-BY-4.0, as versions o 744 is available under CC-BY-4.0, as versions of this text that were processed 795 (for example by the kernel's build system) 745 (for example by the kernel's build system) might contain content taken from 796 files which use a more restrictive license. 746 files which use a more restrictive license.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.