* [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
@ 2026-11-26 8:12 Leon Romanovsky
2026-11-26 9:45 ` Geert Uytterhoeven
2026-11-26 12:23 ` Mark Brown
0 siblings, 2 replies; 7+ messages in thread
From: Leon Romanovsky @ 2026-11-26 8:12 UTC (permalink / raw)
To: Jonathan Corbet, Shuah Khan, Randy Dunlap; +Cc: workflows, linux-doc
From: Leon Romanovsky <leonro@nvidia.com>
AI tools tend to trim backtraces too far. Taint flags, module lists and
module names disappear, which hides that an out-of-tree module was
involved or that an in-kernel API was misused, especially a driver API
that is not meant for general use.
Ask authors to remove only the timestamps and drop the example, which
shows a trace reduced to bare function names. Timestamps are the one
part of a dump that adds only noise.
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
Documentation/process/submitting-patches.rst | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
index 85ba046d66fbf..56b1b38ac59cf 100644
--- a/Documentation/process/submitting-patches.rst
+++ b/Documentation/process/submitting-patches.rst
@@ -763,22 +763,10 @@ phrase``, it is important to be both succinct as well as descriptive.
Backtraces in commit messages
"""""""""""""""""""""""""""""
-Backtraces help document the call chain leading to a problem. However,
-not all backtraces are helpful. For example, early boot call chains are
-unique and obvious. Copying the full dmesg output verbatim, however,
-adds distracting information like timestamps, module lists, register and
-stack dumps.
-
-Therefore, the most useful backtraces should distill the relevant
-information from the dump, which makes it easier to focus on the real
-issue. Here is an example of a well-trimmed backtrace::
-
- unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064)
- at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20)
- Call Trace:
- mba_wrmsr
- update_domains
- rdtgroup_mkdir
+Backtraces help document the call chain leading to a problem. Remove
+only the timestamps and keep the rest of the dump unchanged. Taint
+flags, module lists and module names show whether an out-of-tree module
+was involved or an in-kernel API was misused.
Commentary
^^^^^^^^^^
---
base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f
change-id: 20261125-backtrace-timestamps-29880a2f1cab
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 8:12 [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps Leon Romanovsky
@ 2026-11-26 9:45 ` Geert Uytterhoeven
2026-11-26 10:03 ` Leon Romanovsky
2026-11-26 12:23 ` Mark Brown
1 sibling, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2026-11-26 9:45 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
On Thu, 26 Nov 2026 at 09:13, Leon Romanovsky <leon@kernel.org> wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
>
> AI tools tend to trim backtraces too far. Taint flags, module lists and
> module names disappear, which hides that an out-of-tree module was
> involved or that an in-kernel API was misused, especially a driver API
> that is not meant for general use.
>
> Ask authors to remove only the timestamps and drop the example, which
> shows a trace reduced to bare function names. Timestamps are the one
> part of a dump that adds only noise.
>
> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> ---
> Documentation/process/submitting-patches.rst | 20 ++++----------------
> 1 file changed, 4 insertions(+), 16 deletions(-)
>
> diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
> index 85ba046d66fbf..56b1b38ac59cf 100644
> --- a/Documentation/process/submitting-patches.rst
> +++ b/Documentation/process/submitting-patches.rst
> @@ -763,22 +763,10 @@ phrase``, it is important to be both succinct as well as descriptive.
> Backtraces in commit messages
> """""""""""""""""""""""""""""
>
> -Backtraces help document the call chain leading to a problem. However,
> -not all backtraces are helpful. For example, early boot call chains are
> -unique and obvious. Copying the full dmesg output verbatim, however,
> -adds distracting information like timestamps, module lists, register and
> -stack dumps.
> -
> -Therefore, the most useful backtraces should distill the relevant
> -information from the dump, which makes it easier to focus on the real
> -issue. Here is an example of a well-trimmed backtrace::
> -
> - unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064)
> - at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20)
> - Call Trace:
> - mba_wrmsr
> - update_domains
> - rdtgroup_mkdir
> +Backtraces help document the call chain leading to a problem. Remove
> +only the timestamps and keep the rest of the dump unchanged. Taint
> +flags, module lists and module names show whether an out-of-tree module
> +was involved or an in-kernel API was misused.
Please don't move the burden of distilling the relevant information
from the (single) sender to the (multiple) receivers.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 9:45 ` Geert Uytterhoeven
@ 2026-11-26 10:03 ` Leon Romanovsky
0 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2026-11-26 10:03 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
On Thu, Nov 26, 2026 at 10:45:17AM +0100, Geert Uytterhoeven wrote:
> On Thu, 26 Nov 2026 at 09:13, Leon Romanovsky <leon@kernel.org> wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
> >
> > AI tools tend to trim backtraces too far. Taint flags, module lists and
> > module names disappear, which hides that an out-of-tree module was
> > involved or that an in-kernel API was misused, especially a driver API
> > that is not meant for general use.
> >
> > Ask authors to remove only the timestamps and drop the example, which
> > shows a trace reduced to bare function names. Timestamps are the one
> > part of a dump that adds only noise.
> >
> > Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
> > ---
> > Documentation/process/submitting-patches.rst | 20 ++++----------------
> > 1 file changed, 4 insertions(+), 16 deletions(-)
> >
> > diff --git a/Documentation/process/submitting-patches.rst b/Documentation/process/submitting-patches.rst
> > index 85ba046d66fbf..56b1b38ac59cf 100644
> > --- a/Documentation/process/submitting-patches.rst
> > +++ b/Documentation/process/submitting-patches.rst
> > @@ -763,22 +763,10 @@ phrase``, it is important to be both succinct as well as descriptive.
> > Backtraces in commit messages
> > """""""""""""""""""""""""""""
> >
> > -Backtraces help document the call chain leading to a problem. However,
> > -not all backtraces are helpful. For example, early boot call chains are
> > -unique and obvious. Copying the full dmesg output verbatim, however,
> > -adds distracting information like timestamps, module lists, register and
> > -stack dumps.
> > -
> > -Therefore, the most useful backtraces should distill the relevant
> > -information from the dump, which makes it easier to focus on the real
> > -issue. Here is an example of a well-trimmed backtrace::
> > -
> > - unchecked MSR access error: WRMSR to 0xd51 (tried to write 0x0000000000000064)
> > - at rIP: 0xffffffffae059994 (native_write_msr+0x4/0x20)
> > - Call Trace:
> > - mba_wrmsr
> > - update_domains
> > - rdtgroup_mkdir
> > +Backtraces help document the call chain leading to a problem. Remove
> > +only the timestamps and keep the rest of the dump unchanged. Taint
> > +flags, module lists and module names show whether an out-of-tree module
> > +was involved or an in-kernel API was misused.
>
> Please don't move the burden of distilling the relevant information
> from the (single) sender to the (multiple) receivers.
Kernel dump stacks have evolved over the years into their current form. They
contain different kinds of information, and you will often look for different
clues when working on different patches, even within the same subsystem.
The coding style guidance currently documented in Documentation contradicts
even with the basic debugging aid Greg describes here:
https://lwn.net/Articles/1103714/:
Tainting (or not) on manual driver binding
...
Early in the 7.4 merge window, Greg Kroah-Hartman applied a patch that caused
the kernel to be marked as tainted whenever user space manually binds or unbinds
a device driver to a device. This change was meant to be a defense against
a flood of spurious bug reports generated by fuzzers,
...
A commit message should help people understand why a patch is needed. This
one instead seems designed to persuade an AI to merge it without providing
enough information.
For reference, see this discussion of how AI fabricates reports today and
will do so in the future:
https://lore.kernel.org/workflows/20261116200515.352387-1-sashal@kernel.org/
Thanks
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 8:12 [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps Leon Romanovsky
2026-11-26 9:45 ` Geert Uytterhoeven
@ 2026-11-26 12:23 ` Mark Brown
2026-11-26 12:59 ` Leon Romanovsky
1 sibling, 1 reply; 7+ messages in thread
From: Mark Brown @ 2026-11-26 12:23 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
On Thu, Nov 26, 2026 at 10:12:08AM +0200, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@nvidia.com>
> AI tools tend to trim backtraces too far. Taint flags, module lists and
> module names disappear, which hides that an out-of-tree module was
> involved or that an in-kernel API was misused, especially a driver API
> that is not meant for general use.
> Ask authors to remove only the timestamps and drop the example, which
> shows a trace reduced to bare function names. Timestamps are the one
> part of a dump that adds only noise.
There's more than that, for example when you get something from a
syscall on arm64 you've got five frames before you get to the point
of even invoke_syscall(), and thirty odd registers printed two per line
the values of which are mostly of minimal interest for posterity. They
can be very useful, which is why they're printed, but can really benefit
from some editing a lot of the time.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 12:23 ` Mark Brown
@ 2026-11-26 12:59 ` Leon Romanovsky
2026-11-26 13:22 ` Mark Brown
0 siblings, 1 reply; 7+ messages in thread
From: Leon Romanovsky @ 2026-11-26 12:59 UTC (permalink / raw)
To: Mark Brown
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
On Thu, Nov 26, 2026 at 12:23:36PM +0000, Mark Brown wrote:
> On Thu, Nov 26, 2026 at 10:12:08AM +0200, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@nvidia.com>
>
> > AI tools tend to trim backtraces too far. Taint flags, module lists and
> > module names disappear, which hides that an out-of-tree module was
> > involved or that an in-kernel API was misused, especially a driver API
> > that is not meant for general use.
>
> > Ask authors to remove only the timestamps and drop the example, which
> > shows a trace reduced to bare function names. Timestamps are the one
> > part of a dump that adds only noise.
>
> There's more than that, for example when you get something from a
> syscall on arm64 you've got five frames before you get to the point
> of even invoke_syscall(), and thirty odd registers printed two per line
> the values of which are mostly of minimal interest for posterity. They
> can be very useful, which is why they're printed, but can really benefit
> from some editing a lot of the time.
We can improve the trimming, starting with the point I proposed - the raw stack
trace.
In my experience, the current Documentation example and the trimming suggestion
go too far.
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 12:59 ` Leon Romanovsky
@ 2026-11-26 13:22 ` Mark Brown
2026-11-26 13:30 ` Leon Romanovsky
0 siblings, 1 reply; 7+ messages in thread
From: Mark Brown @ 2026-11-26 13:22 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
On Thu, Nov 26, 2026 at 02:59:59PM +0200, Leon Romanovsky wrote:
> On Thu, Nov 26, 2026 at 12:23:36PM +0000, Mark Brown wrote:
> > There's more than that, for example when you get something from a
> > syscall on arm64 you've got five frames before you get to the point
> > of even invoke_syscall(), and thirty odd registers printed two per line
> > the values of which are mostly of minimal interest for posterity. They
> > can be very useful, which is why they're printed, but can really benefit
> > from some editing a lot of the time.
> We can improve the trimming, starting with the point I proposed - the raw stack
> trace.
> In my experience, the current Documentation example and the trimming suggestion
> go too far.
I think there's room for improvement but I think what you're proposing
right now goes far too far in the other direction. It is a very
definitive statement that nothing should be removed, it would be better
to do things like call out specific bits that are generally relevant and
should not be removed (like taint information) and encourage people to
use faddr2line.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps
2026-11-26 13:22 ` Mark Brown
@ 2026-11-26 13:30 ` Leon Romanovsky
0 siblings, 0 replies; 7+ messages in thread
From: Leon Romanovsky @ 2026-11-26 13:30 UTC (permalink / raw)
To: Mark Brown
Cc: Jonathan Corbet, Shuah Khan, Randy Dunlap, workflows, linux-doc
On Thu, Nov 26, 2026 at 01:22:26PM +0000, Mark Brown wrote:
> On Thu, Nov 26, 2026 at 02:59:59PM +0200, Leon Romanovsky wrote:
> > On Thu, Nov 26, 2026 at 12:23:36PM +0000, Mark Brown wrote:
>
> > > There's more than that, for example when you get something from a
> > > syscall on arm64 you've got five frames before you get to the point
> > > of even invoke_syscall(), and thirty odd registers printed two per line
> > > the values of which are mostly of minimal interest for posterity. They
> > > can be very useful, which is why they're printed, but can really benefit
> > > from some editing a lot of the time.
>
> > We can improve the trimming, starting with the point I proposed - the raw stack
> > trace.
>
> > In my experience, the current Documentation example and the trimming suggestion
> > go too far.
>
> I think there's room for improvement but I think what you're proposing
> right now goes far too far in the other direction. It is a very
> definitive statement that nothing should be removed, it would be better
> to do things like call out specific bits that are generally relevant and
> should not be removed (like taint information) and encourage people to
> use faddr2line.
I'm aware that I took an overly aggressive approach, but there was a
reason for it - it lets us trim the text line by line. If we take the
opposite approach and add request for more information, we'll inevitably
miss important details.
Thanks
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-11-26 13:30 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 8:12 [PATCH] docs: submitting-patches: Limit backtrace trimming to timestamps Leon Romanovsky
2026-11-26 9:45 ` Geert Uytterhoeven
2026-11-26 10:03 ` Leon Romanovsky
2026-11-26 12:23 ` Mark Brown
2026-11-26 12:59 ` Leon Romanovsky
2026-11-26 13:22 ` Mark Brown
2026-11-26 13:30 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox