amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: amd-gfx@lists.freedesktop.org
Subject: kgdb_breakpoint() usage leads to kernel panic
Date: Thu, 22 Oct 2020 11:03:43 +0200	[thread overview]
Message-ID: <s5hy2jybpjk.wl-tiwai@suse.de> (raw)

Hi,

we recently stumbled on a kernel crash in amdgpu [*], and the kernel
messages indicated that it's from kgdb_breakpoint() call in
ASSERT_CRITICAL() macro.

Since CONFIG_KGDB=y is set on the openSUSE distro kernels, the
breakpoint is enabled even though CONFIG_DEBUG_KERNEL_DC=n, and this
leads to a kernel panic because of INT3.  Unfortunately there is no
dynamical control to disable it.

I guess the kernel panic isn't intended for end-users, right?  If so,
shouldn't we cover kgdb_breakpoint() in ASSERT_CRITICAL() also with
CONFIG_DEBUG_KERNEL_DC?

Also, taking a quick glance at the code, I noticed a few things:

- What's the difference of ASSERT() and ASSERT_CRITICAL()?
  Why ASSERT() uses WARN_ON() and WARN_ON_ONCE() conditionally?

- I couldn't see CONFIG_HAVE_KGDB anywhere else.  Is this superfluous?

- CONFIG_DEBUG_KERNEL_DC can have "depends on KGDB" in Kconfig.
  Then the ifdefs can be much simplified.


[*] https://bugzilla.suse.com/show_bug.cgi?id=1177973


thanks,

Takashi
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

             reply	other threads:[~2020-10-22  9:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  9:03 Takashi Iwai [this message]
2020-10-23  7:45 ` kgdb_breakpoint() usage leads to kernel panic Takashi Iwai

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=s5hy2jybpjk.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=amd-gfx@lists.freedesktop.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).