ARM: add "8<--- cut here ---" to kernel dumps
authorRussell King <rmk+kernel@armlinux.org.uk>
Tue, 29 Jan 2019 14:07:58 +0000 (14:07 +0000)
committerRussell King <rmk+kernel@armlinux.org.uk>
Thu, 20 Jun 2019 21:29:23 +0000 (22:29 +0100)
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>
arch/arm/kernel/traps.c
arch/arm/mm/fault.c

index 33af097c454bd53f6beea7419b76953e3228616d..30bffdeac3ac10c55b754d6db26063e7ddb2951f 100644 (file)
@@ -725,6 +725,7 @@ baddataabort(int code, unsigned long instr, struct pt_regs *regs)
 
 #ifdef CONFIG_DEBUG_USER
        if (user_debug & UDBG_BADABORT) {
+               pr_err("8<--- cut here ---\n");
                pr_err("[%d] %s: bad data abort: code %d instr 0x%08lx\n",
                       task_pid_nr(current), current->comm, code, instr);
                dump_instr(KERN_ERR, regs);
index 58f69fa07df95640151ec2576b3a0419a0991da5..743a9e0a1fda0c6950581f6aba2f8968e0d05d42 100644 (file)
@@ -142,6 +142,7 @@ __do_kernel_fault(struct mm_struct *mm, unsigned long addr, unsigned int fsr,
         * No handler, we'll have to terminate things with extreme prejudice.
         */
        bust_spinlocks(1);
+       pr_alert("8<--- cut here ---\n");
        pr_alert("Unable to handle kernel %s at virtual address %08lx\n",
                 (addr < PAGE_SIZE) ? "NULL pointer dereference" :
                 "paging request", addr);
@@ -167,6 +168,7 @@ __do_user_fault(struct task_struct *tsk, unsigned long addr,
 #ifdef CONFIG_DEBUG_USER
        if (((user_debug & UDBG_SEGV) && (sig == SIGSEGV)) ||
            ((user_debug & UDBG_BUS)  && (sig == SIGBUS))) {
+               pr_err("8<--- cut here ---\n");
                printk(KERN_DEBUG "%s: unhandled page fault (%d) at 0x%08lx, code 0x%03x\n",
                       tsk->comm, sig, addr, fsr);
                show_pte(tsk->mm, addr);
@@ -556,6 +558,7 @@ do_DataAbort(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
        if (!inf->fn(addr, fsr & ~FSR_LNX_PF, regs))
                return;
 
+       pr_alert("8<--- cut here ---\n");
        pr_alert("Unhandled fault: %s (0x%03x) at 0x%08lx\n",
                inf->name, fsr, addr);
        show_pte(current->mm, addr);