From: Doug Anderson <dianders@chromium.org>
To: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Sumit Garg <sumit.garg@linaro.org>,
Petr Mladek <pmladek@suse.com>,
Daniel Thompson <daniel.thompson@linaro.org>,
Jason Wessel <jason.wessel@windriver.com>,
kgdb-bugreport@lists.sourceforge.net,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Steven Rostedt <rostedt@goodmis.org>,
John Ogness <john.ogness@linutronix.de>
Subject: Re: [PATCH] printk/kdb: Redirect printk messages into kdb in any context
Date: Fri, 15 May 2020 09:52:16 -0700 [thread overview]
Message-ID: <CAD=FV=XohG8ErL=_fyuA+MXEmfp55aW+SxSunb6YPRYj77bOxQ@mail.gmail.com> (raw)
In-Reply-To: <20200515163638.GI42471@jagdpanzerIV.localdomain>
Hi,
On Fri, May 15, 2020 at 9:36 AM Sergey Senozhatsky
<sergey.senozhatsky@gmail.com> wrote:
>
> On (20/05/15 17:32), Sumit Garg wrote:
> > > Can I please have some context what problem does this solve?
> >
> > You can find the problem description here [1] which leads to this fix.
>
> [..]
>
> > [1] https://lkml.org/lkml/2020/5/12/213
>
> Thanks for the link. I'm slightly surprised it took so many years
> to notice the addition of printk_nmi/printk_safe :)
I haven't looked at all the details, but IIUC we don't normally enter
kgdb on the primary CPU through a NMI context, but the secondary ones
(on x86) always do. Most things are run on the primary CPU and I
think it's relatively unlikely for people to change the primary CPU
(though it is possible).
Probably things got worse when I changed the way "btc" worked to make
it common between all architectures. See commit 9ef50a686b53
("UPSTREAM: kdb: Fix stack crawling on 'running' CPUs that aren't the
master"). Though theoretically someone could have changed masters and
reproduced the problem with a simple "bt" before my patch, now a
relatively normal command "btc" would tickle the problem. I didn't
notice it because I work almost totally on arm/arm64 machines and they
don't have NMI (yet).
In general I've always wondered about why (historically) kgdb bugs
have sometimes gone unnoticed for a period of time. That does seem to
be changing, though, and I've seen a few longstanding bugs getting
fixed recently. :-)
-Doug
next prev parent reply other threads:[~2020-05-15 16:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 8:48 [PATCH] kgdb: Fix broken handling of printk() in NMI context Sumit Garg
2020-05-12 14:25 ` Daniel Thompson
2020-05-13 13:34 ` Sumit Garg
2020-05-14 8:42 ` Petr Mladek
2020-05-15 5:46 ` Sumit Garg
2020-05-15 8:50 ` [PATCH] printk/kdb: Redirect printk messages into kdb in any context Petr Mladek
2020-05-15 10:33 ` Sergey Senozhatsky
2020-05-15 12:02 ` Sumit Garg
2020-05-15 16:36 ` Sergey Senozhatsky
2020-05-15 16:52 ` Doug Anderson [this message]
2020-05-18 6:19 ` Sumit Garg
2020-06-10 16:41 ` Daniel Thompson
2020-06-11 7:27 ` Sergey Senozhatsky
2020-06-11 7:58 ` Petr Mladek
2020-05-15 13:48 ` Daniel Thompson
2020-05-15 16:24 ` Sergey Senozhatsky
2020-05-18 9:21 ` Petr Mladek
2020-05-20 4:21 ` Sergey Senozhatsky
2020-05-20 9:35 ` Daniel Thompson
2020-05-20 10:22 ` [PATCH v2] " Petr Mladek
2020-05-20 11:17 ` Sergey Senozhatsky
2020-05-20 16:07 ` Daniel Thompson
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='CAD=FV=XohG8ErL=_fyuA+MXEmfp55aW+SxSunb6YPRYj77bOxQ@mail.gmail.com' \
--to=dianders@chromium.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=daniel.thompson@linaro.org \
--cc=jason.wessel@windriver.com \
--cc=john.ogness@linutronix.de \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=sumit.garg@linaro.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).