Skip to contentSkip to conversation

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

PATCH In review Sasha Levin 7 participants 22 messages Nov 16 – Nov 22

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 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 +23 -0
index 9cd19a71e96ec..e5f2181e4d663 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,27 @@ 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.
+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,
 include numbers that back them up.  But also describe non-obvious

base-commit: 2138148bf44fd84d3e0a863f0e8cb3627cdcc606

Signature · 1 line
2.53.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 18 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

Quoted 5 lines
#2 lore raw
In reply to Sasha Levin
Quoted 28 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Thanks

#3 lore raw
Quoted 31 lines · Leon Romanovsky
Quoted 30 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

v1: https://lore.kernel.org/r/[email protected]

Quoted 8 lines
Quoted 3 lines
 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

Quoted 3 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue? We could add something explicit in coding-assistants.rst, like:

Evidence
========

Every claim an AI assistant makes about the kernel's behavior at runtime, including backtraces, log excerpts, test results and measurements, **MUST** be backed by an observation from a real run.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n760

Signature · 2 lines
Thanks,
Sasha
#4 lore raw
Quoted 36 lines · Sasha Levin
Quoted 35 lines · Leon Romanovsky
Quoted 33 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)
Quoted 6 lines
Quoted 4 lines

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

Quoted 6 lines
Quoted 4 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue?

I don't know about faked, but useless yes, especially in the cases where in-kernel API is involved.

Quoted 9 lines

We could add something explicit in coding-assistants.rst, like:

Evidence
========

Every claim an AI assistant makes about the kernel's behavior at runtime, including backtraces, log excerpts, test results and measurements, **MUST** be backed by an observation from a real run.

It won't help, they already overcome it by saying "Found by static analysis tool ...".

Thanks

Quoted 7 lines

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst#n760

Signature · 2 lines
Thanks,
Sasha
#5 lore raw
Quoted 7 lines · Leon Romanovsky
Quoted 5 lines · Sasha Levin
Quoted 2 lines · Leon Romanovsky

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

Quoted 7 lines

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

That section came in with

78f101a1b258 ("Documentation/submitting-patches: Add blurb about backtraces in commit messages")

and the tip handbook points at it, so adding Borislav.

Borislav, see above. Leon gets fixes for tool-found bugs with the backtrace cut down to two or three lines, the way "Backtraces in commit messages" asks for, and can't vet the report from what's left.

--
Thanks,
Sasha

Reviewed-by on v2 1/1
#21 lore raw
In reply to Sasha Levin
Quoted 18 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

Quoted 6 lines

---

Best regards,
Krzysztof

#10 lore raw
In reply to Leon Romanovsky
Quoted 31 lines · Leon Romanovsky
Quoted 30 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

v1: https://lore.kernel.org/r/[email protected]

Quoted 8 lines
Quoted 3 lines
 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh. That's often review feedback, btw, people just paste huge bunch of dmesg without thinking what is useful there.

Best regards,
Krzysztof

#11 lore raw
Quoted 8 lines · Krzysztof Kozlowski
Quoted 2 lines · Leon Romanovsky

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh. That's often review feedback, btw, people just paste huge bunch of dmesg without thinking what is useful there.

And full build logs, to prove their patch built fine:
https://lore.kernel.org/all/[email protected]/

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#13 lore raw
In reply to Krzysztof Kozlowski
Quoted 36 lines · Krzysztof Kozlowski
Quoted 35 lines · Leon Romanovsky
Quoted 33 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, in two parts. For users who aren't looking for the bug: what a normal workload is likely to run into, and separately the worst case and what it takes to get there. For someone triggering it on purpose: whether an unprivileged user could do it and what that would take, since a race that no real workload loses can still be won by a program written to win it. 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.

---
Changes since v1:
- Split the bug-fix paragraph into users who aren't looking for the bug and someone triggering it on purpose (Andrew, Willy).

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)
Quoted 7 lines
Quoted 4 lines

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Quoted 2 lines

That's often review feedback, btw, people just paste huge bunch of dmesg without thinking what is useful there.

It’s still better than AI-generated prose peppered with short, two- or three-line stack traces intended to trick me into merging a patch. I’d rather trim the description myself than rely on random submitters to provide exactly the right amount of information—no more, no less.

Thanks

#12 lore raw
In reply to Geert Uytterhoeven
Quoted 5 lines · Geert Uytterhoeven
Quoted 4 lines · Krzysztof Kozlowski
Quoted 2 lines · Leon Romanovsky

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 7 lines
Quoted 4 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh. That's often review feedback, btw, people just paste huge bunch of dmesg without thinking what is useful there.

And full build logs, to prove their patch built fine:
https://lore.kernel.org/all/[email protected]/

This is more of an anecdote than a real issue we need to worry about.

Thanks

Quoted 11 lines

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#14 lore raw
In reply to Leon Romanovsky
Quoted 12 lines · Leon Romanovsky
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 6 lines
Quoted 2 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Best regards,
Krzysztof

#6 lore raw
In reply to Leon Romanovsky
Quoted 14 lines · Leon Romanovsky
Quoted 4 lines
Quoted 2 lines

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue?

I don't know about faked, but useless yes, especially in the cases where in-kernel API is involved.

The situation completely changed over the last year. LLMs that would hallucinate bugs and dmesg in single-turn conversations have been replaced with agents/harnesses calling shell commands and able to capture contents without inventing them. I agree that we should ask them to capture such dmesg which nowadays have no reason to be faked anymore.

Willy

#15 lore raw
In reply to Krzysztof Kozlowski
Quoted 20 lines · Krzysztof Kozlowski
Quoted 12 lines · Leon Romanovsky
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 6 lines
Quoted 2 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Quoted 8 lines

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Then just the 2-3 lines capture inline, and the full log attached could please everyone ?

Willy

#16 lore raw
Quoted 30 lines · Willy Tarreau
Quoted 20 lines · Krzysztof Kozlowski
Quoted 12 lines · Leon Romanovsky
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 6 lines
Quoted 2 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Quoted 8 lines

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Quoted 2 lines

Then just the 2-3 lines capture inline, and the full log attached could please everyone ?

I don't think so, because this information is also important to preserve in the Git history. I received offline feedback that the full stack is useful for backporting and customer support, too. Sometimes the dmesg output is similar enough to recognize, but differs in two or three lines.

I welcome AI-generated patches, but they should not be trusted blindly. I also don't believe AI can reliably trim stack traces.

Thanks

Quoted 2 lines

Willy

#17 lore raw
Quoted 2 lines · Leon Romanovsky
Quoted 1 line · Willy Tarreau

On Thu, Nov 19, 2026 at 01:04:32PM +0100, Krzysztof Kozlowski wrote:

(...)

Quoted 9 lines
Quoted 9 lines
Quoted 8 lines

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Quoted 7 lines
Quoted 2 lines

Then just the 2-3 lines capture inline, and the full log attached could please everyone ?

I don't think so, because this information is also important to preserve in the Git history. I received offline feedback that the full stack is useful for backporting and customer support, too. Sometimes the dmesg output is similar enough to recognize, but differs in two or three lines.

Good point and several times as a user facing an bugs I've looked for messages in history as well before asking for help.

Quoted 2 lines

I welcome AI-generated patches, but they should not be trusted blindly. I also don't believe AI can reliably trim stack traces.

Never trusted indeed, however running "sed -n first,last,p" is now quite common and reliable since the LLM generates the extraction/trimming command, not the contents anymore.

Willy

#7 lore raw
In reply to Willy Tarreau
Quoted 24 lines · Willy Tarreau
Quoted 14 lines · Leon Romanovsky
Quoted 4 lines
Quoted 2 lines

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue?

I don't know about faked, but useless yes, especially in the cases where in-kernel API is involved.

Quoted 6 lines

The situation completely changed over the last year. LLMs that would hallucinate bugs and dmesg in single-turn conversations have been replaced with agents/harnesses calling shell commands and able to capture contents without inventing them. I agree that we should ask them to capture such dmesg which nowadays have no reason to be faked anymore.

The meaning of “faked” has shifted. As you said, it previously referred to a completely imaginary call stack, now it refers to a custom module that abuses the in-kernel API. The latter is still “faked” because it cannot be done with the current code and unlikely will be possible in the future.

Thanks

Quoted 2 lines

Willy

#8 lore raw
Quoted 32 lines · Leon Romanovsky
Quoted 24 lines · Willy Tarreau
Quoted 14 lines · Leon Romanovsky
Quoted 4 lines
Quoted 2 lines

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue?

I don't know about faked, but useless yes, especially in the cases where in-kernel API is involved.

Quoted 6 lines

The situation completely changed over the last year. LLMs that would hallucinate bugs and dmesg in single-turn conversations have been replaced with agents/harnesses calling shell commands and able to capture contents without inventing them. I agree that we should ask them to capture such dmesg which nowadays have no reason to be faked anymore.

Quoted 4 lines

The meaning of "faked" has shifted. As you said, it previously referred to a completely imaginary call stack, now it refers to a custom module that abuses the in-kernel API. The latter is still "faked" because it cannot be done with the current code and unlikely will be possible in the future.

Ah OK we were indeed not speaking about the same cases.

Willy

#18 lore raw
In reply to Leon Romanovsky
Quoted 31 lines · Leon Romanovsky
Quoted 30 lines · Willy Tarreau
Quoted 28 lines · Krzysztof Kozlowski
Quoted 12 lines · Leon Romanovsky
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 6 lines
Quoted 2 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Quoted 6 lines
Quoted 2 lines

Then just the 2-3 lines capture inline, and the full log attached could please everyone ?

I don't think so, because this information is also important to preserve in the Git history. I received offline feedback that the full stack is useful for backporting and customer support, too. Sometimes the dmesg output is similar

Just like we do not mark commits as fixing CVEs/security issues, which plenty of downstream distros would like us to do, we do not write commit msgs for backporting or customer support. Just look at that commit I pointed out - 5b4bd13e0552926648a46c2c9a12a24dfaee3715 - the addresses are making things less readable and the readability is important.

If you need something for customers, then that is what Link tag is for. It can point to your bugzilla or email report with everything.

Best regards,
Krzysztof

#20 lore raw
In reply to Leon Romanovsky
Quoted 9 lines · Leon Romanovsky
Quoted 2 lines · Krzysztof Kozlowski

That's often review feedback, btw, people just paste huge bunch of dmesg without thinking what is useful there.

It’s still better than AI-generated prose peppered with short, two- or three-line stack traces intended to trick me into merging a patch. I’d rather trim the description myself than rely on random submitters to provide exactly the right amount of information—no more, no less.

Honestly, it's generally just as bad - it's usually multiple screenfuls of irrelevant noise which doesn't visually fit the format for a changelog. Half the time people put them in the middle of the changelog which doesn't help anything. With the generated changelogs at least you know to skim read the whole thing and not trust a word that's in there.

#19 lore raw
In reply to Krzysztof Kozlowski
Quoted 39 lines · Krzysztof Kozlowski
Quoted 31 lines · Leon Romanovsky
Quoted 30 lines · Willy Tarreau
Quoted 28 lines · Krzysztof Kozlowski
Quoted 12 lines · Leon Romanovsky
Quoted 11 lines · Krzysztof Kozlowski
Quoted 10 lines
Quoted 5 lines

v1: https://lore.kernel.org/r/[email protected]

 Documentation/process/coding-assistants.rst  |  6 +++--
 Documentation/process/submitting-patches.rst | 23 ++++++++++++++++++++
 2 files changed, 27 insertions(+), 2 deletions(-)

Sasha,

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

Quoted 6 lines
Quoted 2 lines

If so, then trimmed. We do not need all addresses and registers and the [time markers], but rather the calltrace from decode_stacktrace.sh.

Regarding time markers, I agree. However, addresses are an important part of debugging information. These bugs are rare, but addresses are still useful for identifying incorrect pointer arithmetic or pointer assignments.

Depending on the case, e.g. some driver lockdep reports don't need them. NULL ptr usually as well. The point is that dmesg should be trimmed to relevant and useful information. If that includes addresses for that particular case, then of course these should stay. But 75% of data here in commit like 5b4bd13e0552926648a46c2c9a12a24dfaee3715 is not really helping. In the same time undecoded call trace is useless, because these addresses depends on the build. The dmesg should simply be the decoded stacktrace ONLY for this case.

Quoted 6 lines
Quoted 2 lines

Then just the 2-3 lines capture inline, and the full log attached could please everyone ?

I don't think so, because this information is also important to preserve in the Git history. I received offline feedback that the full stack is useful for backporting and customer support, too. Sometimes the dmesg output is similar

Quoted 5 lines

Just like we do not mark commits as fixing CVEs/security issues, which plenty of downstream distros would like us to do, we do not write commit msgs for backporting or customer support. Just look at that commit I pointed out - 5b4bd13e0552926648a46c2c9a12a24dfaee3715 - the addresses are making things less readable and the readability is important.

I looked, but nothing stood out as distracting. I've been reading these stacks for nearly 20 years.

Quoted 3 lines

If you need something for customers, then that is what Link tag is for. It can point to your bugzilla or email report with everything.

You missed my point, I'm not asking customers to dig into the kernel. An FAE or customer comes to me with a crash, and I need to determine whether it's a known issue (and point them to the relevant patch) or a different one.

Thanks

Quoted 6 lines

Best regards,
Krzysztof

#9 lore raw
In reply to Willy Tarreau
Quoted 33 lines · Willy Tarreau
Quoted 32 lines · Leon Romanovsky
Quoted 30 lines · Willy Tarreau
Quoted 14 lines · Leon Romanovsky
Quoted 4 lines
Quoted 2 lines

Since you're already making changes in that area, could you add a sentence asking reporters to provide the full dmesg stack trace?

In this doc, we already ask them not to [1] :)

This is really bad. You assumed they would trim the logs correctly, and I, as the recipient was expected to trust that they were accurate. They are not.

They trim everything, which makes these logs useless to me. As I said, they include AI-generated reports, cases with reproductions that are impossible with upstream code, and reports for completely out-of-tree code. Everything like that was visible in original dump stack and it is lost now.

Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Many AI-generated patches reduce it to one or two lines, which gives no indication of whether the report is genuine or fabricated. Early in the AI era, I saw some completely fabricated stack traces.

Is it still an issue?

I don't know about faked, but useless yes, especially in the cases where in-kernel API is involved.

The situation completely changed over the last year. LLMs that would hallucinate bugs and dmesg in single-turn conversations have been replaced with agents/harnesses calling shell commands and able to capture contents without inventing them. I agree that we should ask them to capture such dmesg which nowadays have no reason to be faked anymore.

Quoted 6 lines
Quoted 4 lines

The meaning of "faked" has shifted. As you said, it previously referred to a completely imaginary call stack, now it refers to a custom module that abuses the in-kernel API. The latter is still "faked" because it cannot be done with the current code and unlikely will be possible in the future.

Ah OK we were indeed not speaking about the same cases.

Over the weekend, I realized that after this wave of incorrect and deliberate misuse of kernel APIs, we’ll see the next level - misuse of internal driver APIs as well.

I’m referring to the various EXPORT_SYMBOL()s in large, complex drivers such as mlx5, bnxt, and Intel’s drivers.

The idea that “let’s trim the dmesg stack” is going to be a disaster for everyone involved.

Thanks

Quoted 2 lines

Willy