Skip to contentSkip to conversation

docs: submitting-patches: ask bug fixes for their user-visible impact

PATCH Superseded Sasha Levin 3 participants 7 messages Nov 16

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 docs: submitting-patches: ask bug fixes for their user-visible impact

"Describe your changes" already asks for the user-visible impact of a change, but changelogs for fixes still tend to say what the code does, why that's wrong and what the patch changes, and stop there. Whoever has to decide if the fix needs backporting is left to work out what the bug does to a running system.

Say what that means for a bug fix: describe the worst a user can see and what it takes to trigger it, say so if the bug was never seen to happen, and say so if it has no visible effect at all. Give the paragraph a label so people can be pointed at it.

Coding assistants are told to commit a fix with a message that describes the problem and the solution. Add the user-visible impact to that list and point them at the section.

---
 Documentation/process/coding-assistants.rst  |  6 ++++--
 Documentation/process/submitting-patches.rst | 11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
Documentation/process/coding-assistants.rst +4 -2
index 509dbf23a099b..ef01ce8d0ff91 100644
@@ -63,8 +63,10 @@ these steps:
    re-running a complete analysis; drop any fix that doesn't work and try
    another one. The fix must not add build warnings and must pass the
    checkpatch.pl checks (see submitting-patches.rst).
-6. Commit the working fix with a detailed message describing the problem, the
-   solution and a Fixes tag. Do not add a Signed-off-by tag.
+6. Commit the working fix with a detailed message describing the problem, its
+   user-visible impact (see "Describe your changes" in
+   Documentation/process/submitting-patches.rst), the solution and a Fixes
+   tag. Do not add a Signed-off-by tag.
 7. Identify the maintainers and lists using scripts/get_maintainer.pl.
    Documentation/process/security-bugs.rst shows how to do that.
 8. Indicate what could not be done. If the fix could not be built or tested, or
Documentation/process/submitting-patches.rst +11 -0
index 9cd19a71e96ec..52cccb08ce896 100644
@@ -51,6 +51,8 @@ motivated you to do this work.  Convince the reviewer that there is a
 problem worth fixing and that it makes sense for them to read past the
 first paragraph.
 
+.. _user_visible_impact:
+
 Describe user-visible impact.  Straight up crashes and lockups are
 pretty convincing, but not all bugs are that blatant.  Even if the
 problem was spotted during code review, describe the impact you think
@@ -61,6 +63,15 @@ from upstream, so include anything that could help route your change
 downstream: provoking circumstances, excerpts from dmesg, crash
 descriptions, performance regressions, latency spikes, lockups, etc.
 
+For a bug fix, this means saying what the bug does to a running system:
+the worst that a user can see, and what it takes to trigger it.  An
+account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  If the bug was found
+by review or by a tool and has never been seen to happen, say so.  If
+it has no effect that a user could notice, say that too.  Maintainers
+and the people looking after stable trees decide from this whether the
+fix needs to be backported.
+
 Quantify optimizations and trade-offs.  If you claim improvements in
 performance, memory consumption, stack footprint, or binary size,
 include numbers that back them up.  But also describe non-obvious

base-commit: 2138148bf44fd84d3e0a863f0e8cb3627cdcc606

Signature · 1 line
2.53.0
Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Mon, 16 Nov 2026 14:14:36 -0500 Sasha Levin <[email protected]> wrote:

"Describe your changes" already asks for the user-visible impact of a change, but changelogs for fixes still tend to say what the code does, why that's wrong and what the patch changes, and stop there. Whoever has to decide if the fix needs backporting is left to work out what the bug does to a running system.

Quoted 8 lines

Say what that means for a bug fix: describe the worst a user can see and what it takes to trigger it, say so if the bug was never seen to happen, and say so if it has no visible effect at all. Give the paragraph a label so people can be pointed at it.

Coding assistants are told to commit a fix with a message that describes the problem and the solution. Add the user-visible impact to that list and point them at the section.

Thanks. Hopefully this will reduce my outbound nagmails.

Documentation/process/submitting-patches.rst from upstream, so include anything that could help route your change · line 73

Quoted 8 lines
Documentation/process/submitting-patches.rst +8 -0
+For a bug fix, this means saying what the bug does to a running system:
+the worst that a user can see, and what it takes to trigger it.  An
+account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  If the bug was found
+by review or by a tool and has never been seen to happen, say so.  If
+it has no effect that a user could notice, say that too.  Maintainers
+and the people looking after stable trees decide from this whether the
+fix needs to be backported.

However, I fear that in these times this isn't strong enough.

The question used to be "will this bug impact real-world people doing real-world things".

That's an insufficient question to be asking now. An additional question is "can this bug permit a sufficiently motivated, well funded and LLM-using Bad Actor to cause problems".

Real-world people's real-world workloads don't use an LLM-written exploit to set 16 CPUs hammering away at an LLM-detected kernel race for an hour.

So those fantastically-hard-to-hit bugs have become things which we (and those whom we serve) care about more than we used to.

Maybe this doc addresses that elsewhere, tl;dr ;)

#2 lore raw
Quoted 39 lines · Andrew Morton
Quoted 6 lines · On Mon, 16 Nov 2026 14:14:36 -0500 Sasha Levin <[email protected]> wrote:

"Describe your changes" already asks for the user-visible impact of a change, but changelogs for fixes still tend to say what the code does, why that's wrong and what the patch changes, and stop there. Whoever has to decide if the fix needs backporting is left to work out what the bug does to a running system.

Quoted 8 lines

Say what that means for a bug fix: describe the worst a user can see and what it takes to trigger it, say so if the bug was never seen to happen, and say so if it has no visible effect at all. Give the paragraph a label so people can be pointed at it.

Coding assistants are told to commit a fix with a message that describes the problem and the solution. Add the user-visible impact to that list and point them at the section.

Thanks. Hopefully this will reduce my outbound nagmails.

Documentation/process/submitting-patches.rst from upstream, so include anything that could help route your change · line 73

Quoted 8 lines
Documentation/process/submitting-patches.rst +8 -0
+For a bug fix, this means saying what the bug does to a running system:
+the worst that a user can see, and what it takes to trigger it.  An
+account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  If the bug was found
+by review or by a tool and has never been seen to happen, say so.  If
+it has no effect that a user could notice, say that too.  Maintainers
+and the people looking after stable trees decide from this whether the
+fix needs to be backported.

However, I fear that in these times this isn't strong enough.

The question used to be "will this bug impact real-world people doing real-world things".

That's an insufficient question to be asking now. An additional question is "can this bug permit a sufficiently motivated, well funded and LLM-using Bad Actor to cause problems".

Quoted 6 lines

Real-world people's real-world workloads don't use an LLM-written exploit to set 16 CPUs hammering away at an LLM-detected kernel race for an hour.

So those fantastically-hard-to-hit bugs have become things which we (and those whom we serve) care about more than we used to.

Agreed but there's a difference in who makes the effort. When it's the attacker, it does count. When it requires the user to be complice (as is frequently the case, typically in security reports), it's no longer the same as what matters is that users who did nothing to shoot themselves in the foot stay safe. Those who shoot, well...

Quoted 1 line

Maybe this doc addresses that elsewhere, tl;dr ;)

Willy

#3 lore raw
In reply to Andrew Morton
Quoted 8 lines · Andrew Morton

However, I fear that in these times this isn't strong enough.

The question used to be "will this bug impact real-world people doing real-world things".

That's an insufficient question to be asking now. An additional question is "can this bug permit a sufficiently motivated, well funded and LLM-using Bad Actor to cause problems".

[...]

Quoted 1 line

Maybe this doc addresses that elsewhere, tl;dr ;)

It doesn't. The closest thing is the "send exploitable bugs to security@" paragraph further down, and that assumes you already know it's exploitable.

Willy pointed out the other side of this: ask an LLM for the worst case and it'll stack up every config option, module and USB emulator needed to get there, while for backports you also want to know whether innocent users are affected at all.

I think both fit if we ask about the two cases separately. Something like this on top?

Documentation/process/submitting-patches.rst +20 -8
@@ -63,14 +63,26 @@ from upstream, so include anything that could help route your change
 downstream: provoking circumstances, excerpts from dmesg, crash
 descriptions, performance regressions, latency spikes, lockups, etc.
 
-For a bug fix, this means saying what the bug does to a running system:
-the worst that a user can see, and what it takes to trigger it.  An
-account of what the code does wrong is not a substitute, as it leaves
-every reader to work the consequences out again.  If the bug was found
-by review or by a tool and has never been seen to happen, say so.  If
-it has no effect that a user could notice, say that too.  Maintainers
-and the people looking after stable trees decide from this whether the
-fix needs to be backported.
+For a bug fix, this means saying what the bug does to a running system.
+An account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  Cover two cases:
+
+- Users who are not looking for the bug.  Say what a normal workload is
+  likely to run into, and separately what the worst case is and what it
+  takes to get there: configuration, hardware, privileges, timing.  If
+  the bug was found by review or by a tool and has never been seen to
+  happen, say so.  If it has no effect that a user could notice, say
+  that too.
+
+- Someone triggering the bug on purpose.  Say whether an unprivileged
+  user could do it and what that would take.  A race that no normal
+  workload loses can still be won by a program that retries it on every
+  CPU for an hour.  If that makes the bug a vulnerability under
+  Documentation/process/threat-model.rst, follow
+  Documentation/process/security-bugs.rst.
+
+Maintainers and the people looking after stable trees decide from this
+whether the fix needs to be backported.
 
 Quantify optimizations and trade-offs.  If you claim improvements in
 performance, memory consumption, stack footprint, or binary size,

If that works for both of you I'll fold it into a v2.

Signature · 2 lines
Thanks,
Sasha
Acked-by
#4 lore raw
Quoted 48 lines · On Mon, 16 Nov 2026 14:52:05 -0500 Sasha Levin <[email protected]> wrote:

Willy pointed out the other side of this: ask an LLM for the worst case and it'll stack up every config option, module and USB emulator needed to get there, while for backports you also want to know whether innocent users are affected at all.

I think both fit if we ask about the two cases separately. Something like this on top?

Documentation/process/submitting-patches.rst +20 -8
@@ -63,14 +63,26 @@ from upstream, so include anything that could help route your change
 downstream: provoking circumstances, excerpts from dmesg, crash
 descriptions, performance regressions, latency spikes, lockups, etc.
 
-For a bug fix, this means saying what the bug does to a running system:
-the worst that a user can see, and what it takes to trigger it.  An
-account of what the code does wrong is not a substitute, as it leaves
-every reader to work the consequences out again.  If the bug was found
-by review or by a tool and has never been seen to happen, say so.  If
-it has no effect that a user could notice, say that too.  Maintainers
-and the people looking after stable trees decide from this whether the
-fix needs to be backported.
+For a bug fix, this means saying what the bug does to a running system.
+An account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  Cover two cases:
+
+- Users who are not looking for the bug.  Say what a normal workload is
+  likely to run into, and separately what the worst case is and what it
+  takes to get there: configuration, hardware, privileges, timing.  If
+  the bug was found by review or by a tool and has never been seen to
+  happen, say so.  If it has no effect that a user could notice, say
+  that too.
+
+- Someone triggering the bug on purpose.  Say whether an unprivileged
+  user could do it and what that would take.  A race that no normal
+  workload loses can still be won by a program that retries it on every
+  CPU for an hour.  If that makes the bug a vulnerability under
+  Documentation/process/threat-model.rst, follow
+  Documentation/process/security-bugs.rst.
+
+Maintainers and the people looking after stable trees decide from this
+whether the fix needs to be backported.
 
 Quantify optimizations and trade-offs.  If you claim improvements in
 performance, memory consumption, stack footprint, or binary size,
Quoted 1 line

If that works for both of you I'll fold it into a v2.

Looks good, thanks. Still

Of course we don't have to get this perfect. Close enough is good enough. Deploy it, observe effects, fine-tune later.

Reviewed-by
#5 lore raw
Quoted 50 lines · Andrew Morton
Quoted 48 lines · On Mon, 16 Nov 2026 14:52:05 -0500 Sasha Levin <[email protected]> wrote:

Willy pointed out the other side of this: ask an LLM for the worst case and it'll stack up every config option, module and USB emulator needed to get there, while for backports you also want to know whether innocent users are affected at all.

I think both fit if we ask about the two cases separately. Something like this on top?

Documentation/process/submitting-patches.rst +20 -8
@@ -63,14 +63,26 @@ from upstream, so include anything that could help route your change
 downstream: provoking circumstances, excerpts from dmesg, crash
 descriptions, performance regressions, latency spikes, lockups, etc.
 
-For a bug fix, this means saying what the bug does to a running system:
-the worst that a user can see, and what it takes to trigger it.  An
-account of what the code does wrong is not a substitute, as it leaves
-every reader to work the consequences out again.  If the bug was found
-by review or by a tool and has never been seen to happen, say so.  If
-it has no effect that a user could notice, say that too.  Maintainers
-and the people looking after stable trees decide from this whether the
-fix needs to be backported.
+For a bug fix, this means saying what the bug does to a running system.
+An account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  Cover two cases:
+
+- Users who are not looking for the bug.  Say what a normal workload is
+  likely to run into, and separately what the worst case is and what it
+  takes to get there: configuration, hardware, privileges, timing.  If
+  the bug was found by review or by a tool and has never been seen to
+  happen, say so.  If it has no effect that a user could notice, say
+  that too.
+
+- Someone triggering the bug on purpose.  Say whether an unprivileged
+  user could do it and what that would take.  A race that no normal
+  workload loses can still be won by a program that retries it on every
+  CPU for an hour.  If that makes the bug a vulnerability under
+  Documentation/process/threat-model.rst, follow
+  Documentation/process/security-bugs.rst.
+
+Maintainers and the people looking after stable trees decide from this
+whether the fix needs to be backported.
 
 Quantify optimizations and trade-offs.  If you claim improvements in
 performance, memory consumption, stack footprint, or binary size,
Quoted 7 lines
Quoted 1 line

If that works for both of you I'll fold it into a v2.

Looks good, thanks. Still

Of course we don't have to get this perfect. Close enough is good enough. Deploy it, observe effects, fine-tune later.

Agreed, looks great to me as well.

Willy

Reviewed-by on v1 1/1
#6 lore raw
In reply to Sasha Levin

Hi Sasha,

Quoted 56 lines · Sasha Levin

"Describe your changes" already asks for the user-visible impact of a change, but changelogs for fixes still tend to say what the code does, why that's wrong and what the patch changes, and stop there. Whoever has to decide if the fix needs backporting is left to work out what the bug does to a running system.

Say what that means for a bug fix: describe the worst a user can see and what it takes to trigger it, say so if the bug was never seen to happen, and say so if it has no visible effect at all. Give the paragraph a label so people can be pointed at it.

Coding assistants are told to commit a fix with a message that describes the problem and the solution. Add the user-visible impact to that list and point them at the section.

---
 Documentation/process/coding-assistants.rst  |  6 ++++--
 Documentation/process/submitting-patches.rst | 11 +++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)
Documentation/process/coding-assistants.rst +4 -2
index 509dbf23a099b..ef01ce8d0ff91 100644
@@ -63,8 +63,10 @@ these steps:
    re-running a complete analysis; drop any fix that doesn't work and try
    another one. The fix must not add build warnings and must pass the
    checkpatch.pl checks (see submitting-patches.rst).
-6. Commit the working fix with a detailed message describing the problem, the
-   solution and a Fixes tag. Do not add a Signed-off-by tag.
+6. Commit the working fix with a detailed message describing the problem, its
+   user-visible impact (see "Describe your changes" in
+   Documentation/process/submitting-patches.rst), the solution and a Fixes
+   tag. Do not add a Signed-off-by tag.
 7. Identify the maintainers and lists using scripts/get_maintainer.pl.
    Documentation/process/security-bugs.rst shows how to do that.
 8. Indicate what could not be done. If the fix could not be built or tested, or
Documentation/process/submitting-patches.rst +2 -0
index 9cd19a71e96ec..52cccb08ce896 100644
@@ -51,6 +51,8 @@ motivated you to do this work.  Convince the reviewer that there is a
 problem worth fixing and that it makes sense for them to read past the
 first paragraph.
 
+.. _user_visible_impact:
+
 Describe user-visible impact.  Straight up crashes and lockups are
 pretty convincing, but not all bugs are that blatant.  Even if the
 problem was spotted during code review, describe the impact you think
@@ -61,6 +63,15 @@ from upstream, so include anything that could help route your change
 downstream: provoking circumstances, excerpts from dmesg, crash
 descriptions, performance regressions, latency spikes, lockups, etc.

Documentation/process/submitting-patches.rst from upstream, so include anything that could help route your change · line 74

Quoted 10 lines
Documentation/process/submitting-patches.rst +9 -0
 
+For a bug fix, this means saying what the bug does to a running system:
+the worst that a user can see, and what it takes to trigger it.  An
+account of what the code does wrong is not a substitute, as it leaves
+every reader to work the consequences out again.  If the bug was found
+by review or by a tool and has never been seen to happen, say so.  If
+it has no effect that a user could notice, say that too.  Maintainers
+and the people looking after stable trees decide from this whether the
+fix needs to be backported.
+

Look good.

I think we can go even further by distinguishing the absolute worst that can happen from the most likely. When you ask an LLM analyzing code about a worst case, it doesn't care much about the real world and will often explain that if the user enable CONFIG_xxx and write foo under /proc/something and has force-loaded some outdated modules and has plugged a device emulator into their USB port, then the bug could indeed get worse. For backports you also want to know whether innocent users are affected or not.

Quoted 7 lines
Documentation/process/submitting-patches.rst +0 -0
 Quantify optimizations and trade-offs.  If you claim improvements in
 performance, memory consumption, stack footprint, or binary size,
 include numbers that back them up.  But also describe non-obvious

base-commit: 2138148bf44fd84d3e0a863f0e8cb3627cdcc606

Signature · 1 line
2.53.0

Cheers,
Willy