lkml.org 
[lkml]   [2017]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] printk: Fix kdb_trap_printk placement
On Thu 2017-10-05 15:42:27, Peter Zijlstra wrote:
> On Thu, Oct 05, 2017 at 03:38:44PM +0200, Petr Mladek wrote:
> > Or can the kdb console commands be called in NMI context?
>
> IIRC most of KDB runs from NMI context.

To be honest, I am not familiar with kdb. I tried the following
from Documentation/dev-tools/kgdb.rst:

$> echo ttyS0 > /sys/module/kgdboc/parameters/kgdboc
$> echo g >/proc/sysrq-trigger

Result: I was able to do kdb commands on the serial console.
Note: It seems that this stuff was _not_ running in NMI.

Then I tried to set breakpoint for a function that is
called in NMI context:

$kdb> bt show_regs

Where show_regs() is called from nmi_cpu_backtrace(). I unblocked
the system and triggered ''l'' sysrq to show stacks from all CPUs:

$kdb> go
$> echo l >/proc/sysrq-trigger

Result: The system frozen and I had to reboot using a power switch.


I wonder if the break point in NMI is supposed to work and if the
kdb commands are handled in NMI context on the serial console then.

By other words, do you need this patch for a particular use-case?
Or did you added this patch just to fix a theoretical problem?

Best Regards,
Petr

\
 
 \ /
  Last update: 2017-10-09 17:06    [W:0.084 / U:0.244 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site