Skip to contentSkip to conversation

kdb: Remove stack dump when entering kgdb due to NMI

PATCH Superseded Daniel Thompson 1 participant 4 messages Jul 16, 2014 – Jan 7, 2015 KGDB / KDB /debug_core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kdb: Remove stack dump when entering kgdb due to NMI

Issuing a stack dump feels ergonomically wrong when entering due to NMI.

Entering due to NMI is a normally reaction to a user request, either the NMI button on a server or a "magic knock" on a UART. Therefore the backtrace behaviour on entry due to NMI should be like SysRq-g (no stack dump) rather than like oops.

Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command.

---
 kernel/debug/kdb/kdb_main.c | 1 -
 1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_main.c +0 -1
index 49f2425..6d19905 100644
@@ -1207,7 +1207,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
 		kdb_printf("due to NonMaskable Interrupt @ "
 			   kdb_machreg_fmt "\n",
 			   instruction_pointer(regs));
-		kdb_dumpregs(regs);
 		break;
 	case KDB_REASON_SSTEP:
 	case KDB_REASON_BREAK:
Signature · 1 line
1.9.3
#1 lore raw

PATCH RESEND 1/1 kdb: Remove stack dump when entering kgdb due to NMI

Issuing a stack dump feels ergonomically wrong when entering due to NMI.

Entering due to NMI is a normally reaction to a user request, either the NMI button on a server or a "magic knock" on a UART. Therefore the backtrace behaviour on entry due to NMI should be like SysRq-g (no stack dump) rather than like oops.

Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command.

---
 kernel/debug/kdb/kdb_main.c | 1 -
 1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_main.c +0 -1
index 379650b..f9ba423 100644
@@ -1207,7 +1207,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
 		kdb_printf("due to NonMaskable Interrupt @ "
 			   kdb_machreg_fmt "\n",
 			   instruction_pointer(regs));
-		kdb_dumpregs(regs);
 		break;
 	case KDB_REASON_SSTEP:
 	case KDB_REASON_BREAK:

--
1.9.3

#2 lore raw

PATCH RESEND 1/1 kdb: Remove stack dump when entering kgdb due to NMI

In reply to Daniel Thompson

Issuing a stack dump feels ergonomically wrong when entering due to NMI.

Entering due to NMI is normally a reaction to a user request, either the NMI button on a server or a "magic knock" on a UART. Therefore the backtrace behaviour on entry due to NMI should be like SysRq-g (no stack dump) rather than like oops.

Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command.

---
 kernel/debug/kdb/kdb_main.c | 1 -
 1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_main.c +0 -1
index 379650b..f9ba423 100644
@@ -1207,7 +1207,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
 		kdb_printf("due to NonMaskable Interrupt @ "
 			   kdb_machreg_fmt "\n",
 			   instruction_pointer(regs));
-		kdb_dumpregs(regs);
 		break;
 	case KDB_REASON_SSTEP:
 	case KDB_REASON_BREAK:

--
1.9.3

#3 lore raw

PATCH RESEND 1/1 kdb: Remove stack dump when entering kgdb due to NMI

In reply to Daniel Thompson

Issuing a stack dump feels ergonomically wrong when entering due to NMI.

Entering due to NMI is normally a reaction to a user request, either the NMI button on a server or a "magic knock" on a UART. Therefore the backtrace behaviour on entry due to NMI should be like SysRq-g (no stack dump) rather than like oops.

Note also that the stack dump does not offer any information that cannot be trivial retrieved using the 'bt' command.

---
 kernel/debug/kdb/kdb_main.c | 1 -
 1 file changed, 1 deletion(-)
kernel/debug/kdb/kdb_main.c +0 -1
index 379650b984f8..f9ba42363132 100644
@@ -1207,7 +1207,6 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
 		kdb_printf("due to NonMaskable Interrupt @ "
 			   kdb_machreg_fmt "\n",
 			   instruction_pointer(regs));
-		kdb_dumpregs(regs);
 		break;
 	case KDB_REASON_SSTEP:
 	case KDB_REASON_BREAK:

--
1.9.3