kgdb_breakpoint() usage leads to kernel panic
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Quoted 21 lines · Takashi Iwai
Hi,
we recently stumbled on a kernel crash in amdgpu [*], and the kernel messages indicated that it's from
kgdb_breakpoint()call inASSERT_CRITICAL()macro.Since
CONFIG_KGDB=yis set on the openSUSE distro kernels, the breakpoint is enabled even thoughCONFIG_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()inASSERT_CRITICAL()also withCONFIG_DEBUG_KERNEL_DC?Also, taking a quick glance at the code, I noticed a few things:
- What's the difference of
ASSERT()andASSERT_CRITICAL()? WhyASSERT()usesWARN_ON()andWARN_ON_ONCE()conditionally?
Quoted 7 lines
- I couldn't see
CONFIG_HAVE_KGDBanywhere else. Is this superfluous?-
CONFIG_DEBUG_KERNEL_DCcan have "depends on KGDB" inKconfig. Then the ifdefs can be much simplified.
As there's no reply, I'm going to submit the fix patches.
Takashi
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx