Skip to content

Commit bafeb7a

Browse files
author
Russell King
committed
ARM: add "8<--- cut here ---" to kernel dumps
Add a "8<--- cut here ---" marker to kernel dumps to help users cut the dump at the right place when emailing list, rather than cutting off the first line which gives the reason for the dump. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
1 parent cd6c84d commit bafeb7a

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎arch/arm/kernel/traps.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
725725

726726
#ifdef CONFIG_DEBUG_USER
727727
if (user_debug & UDBG_BADABORT) {
728+
pr_err("8<--- cut here ---\n");
728729
pr_err("[%d] %s: bad data abort: code %d instr 0x%08lx\n",
729730
task_pid_nr(current), current->comm, code, instr);
730731
dump_instr(KERN_ERR, regs);

‎arch/arm/mm/fault.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
142142
* No handler, we'll have to terminate things with extreme prejudice.
143143
*/
144144
bust_spinlocks(1);
145+
pr_alert("8<--- cut here ---\n");
145146
pr_alert("Unable to handle kernel %s at virtual address %08lx\n",
146147
(addr < PAGE_SIZE) ? "NULL pointer dereference" :
147148
"paging request", addr);
@@ -167,6 +168,7 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
167168
#ifdef CONFIG_DEBUG_USER
168169
if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
169170
((user_debug & UDBG_BUS) && (sig == SIGBUS))) {
171+
pr_err("8<--- cut here ---\n");
170172
printk(KERN_DEBUG "%s: unhandled page fault (%d) at 0x%08lx, code 0x%03x\n",
171173
tsk->comm, sig, addr, fsr);
172174
show_pte(tsk->mm, addr);
@@ -556,6 +558,7 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
556558
if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
557559
return;
558560

561+
pr_alert("8<--- cut here ---\n");
559562
pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n",
560563
inf->name, fsr, addr);
561564
show_pte(current->mm, addr);

0 commit comments

Comments
 (0)