linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Sean Christopherson <seanjc@google.com>
Cc: Jonathan Corbet <corbet@lwn.net>, x86-ml <x86@kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Documentation/submitting-patches: Add blurb about backtraces in commit messages
Date: Tue, 22 Dec 2020 20:25:17 +0100	[thread overview]
Message-ID: <20201222192517.GE13463@zn.tnic> (raw)
In-Reply-To: <X+JCCqTJkgZASj7T@google.com>

On Tue, Dec 22, 2020 at 10:59:22AM -0800, Sean Christopherson wrote:
> On Tue, Dec 22, 2020, Borislav Petkov wrote:
> > Ok, here's the next one which I think, is also, not really controversial.
> 
> Heh, are you trying to jinx yourself?

I was trying to conjure up some bikeshedding... and there it is! :-)

> > +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.
> 
> I'd argue that there is still value in the backtrace though, e.g. I find them
> very helpful when doing git archaeology.  A backtrace is an easily recognizable
> signature (don't have to read a bunch of text to understand there was a splat of
> some kind), and the call stack is often helpful even if it is unique, e.g. for
> unfamiliar code (including early boot chains) and/or code that is substantially
> different from the current upstream.

I think the intent of the text is to say not to include callchains which
are *really* obvious. As in, there's no ambiguity as to how one has
landed here.

Also, sometimes people paste backtraces from a WARN* which are almost
always superfluous - only the warn's address is important. This is at
least how I go about debugging those.

Maybe the text should be made more precise.

> I'd prefer not to encourage people to strip the info after the function name,
> though I do agree it's somewhat distracting (especially the offset/size).

Yes. Especially since they don't make any sense on another system or
even on the same system but with a different .config.

> The module, call site in the function, exact file/line if available,
> etc... provides context that I find helpful for building a mental
> model of what went wrong.

File/line is more useful, yes, but only for the current code snapshot.
When time passes and stuff gets changed, those file/line things are not
correct anymore so one would have to checkout the tree on which the
splat happened.

I guess I need to make that aspect more precise too.

> E.g. which modules are in play, which short wrapper functions can
> likely be glossed over, etc...

That example doesn't have modules. I guess I'll generate a new one.

Thx.

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  reply	other threads:[~2020-12-22 19:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-17 18:37 [PATCH] Documentation/submitting-patches: Document the SoB chain Borislav Petkov
2020-12-21 16:54 ` Jonathan Corbet
2020-12-22 13:05   ` [PATCH] Documentation/submitting-patches: Add blurb about backtraces in commit messages Borislav Petkov
2020-12-22 18:59     ` Sean Christopherson
2020-12-22 19:25       ` Borislav Petkov [this message]
2020-12-28 17:59         ` Sean Christopherson
2020-12-28 18:15           ` Borislav Petkov
2020-12-28 19:02             ` Sean Christopherson
2021-01-04 23:19     ` Jonathan Corbet
2021-01-05 10:48       ` Borislav Petkov
2021-02-02 15:43         ` Borislav Petkov
2021-02-04 21:20           ` Jonathan Corbet
2021-02-15 14:19 ` [PATCH] Documentation/submitting-patches: Extend commit message layout description Borislav Petkov
2021-02-25 11:40   ` Robert Richter
2021-03-01 22:10   ` Jonathan Corbet
2021-04-13 11:38 ` [PATCH] Documentation/submitting-patches: Document RESEND tag on patches Borislav Petkov
2021-04-13 21:02   ` Jonathan Corbet
2021-04-15  6:05     ` Borislav Petkov
2021-05-31 14:35       ` Borislav Petkov
2021-06-01 22:27         ` Jonathan Corbet
2021-06-01 22:31           ` Randy Dunlap
2021-06-01 22:37           ` Borislav Petkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201222192517.GE13463@zn.tnic \
    --to=bp@alien8.de \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).