* kgdb_breakpoint() usage leads to kernel panic
@ 2020-10-22 9:03 Takashi Iwai
2020-10-23 7:45 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2020-10-22 9:03 UTC (permalink / raw)
To: amd-gfx
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: kgdb_breakpoint() usage leads to kernel panic
2020-10-22 9:03 kgdb_breakpoint() usage leads to kernel panic Takashi Iwai
@ 2020-10-23 7:45 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-10-23 7:45 UTC (permalink / raw)
To: amd-gfx
On Thu, 22 Oct 2020 11:03:43 +0200,
Takashi Iwai wrote:
>
> 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
As there's no reply, I'm going to submit the fix patches.
Takashi
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-23 7:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 9:03 kgdb_breakpoint() usage leads to kernel panic Takashi Iwai
2020-10-23 7:45 ` Takashi Iwai
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).