linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: add "8<--- cut here ---" to kernel dumps
@ 2019-01-29 14:14 Russell King
  2019-01-29 15:33 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2019-01-29 14:14 UTC (permalink / raw)
  To: linux-arm-kernel

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 | 1 +
 arch/arm/mm/fault.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 2f15d3f3ecdc..e3a0c7bdd150 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -729,6 +729,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);
diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c
index 58f69fa07df9..743a9e0a1fda 100644
--- a/arch/arm/mm/fault.c
+++ b/arch/arm/mm/fault.c
@@ -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);
-- 
2.7.4


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: add "8<--- cut here ---" to kernel dumps
  2019-01-29 14:14 [PATCH] ARM: add "8<--- cut here ---" to kernel dumps Russell King
@ 2019-01-29 15:33 ` Andrew Lunn
  2019-01-29 15:39   ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Lunn @ 2019-01-29 15:33 UTC (permalink / raw)
  To: Russell King; +Cc: linux-arm-kernel

On Tue, Jan 29, 2019 at 02:14:53PM +0000, Russell King wrote:
> 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.

Hi Russell

Good idea.

Is it worth also putting a marked at the end? I sometime get crash
dumps with the stack trace chopped off.

Thanks
	Andrew

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] ARM: add "8<--- cut here ---" to kernel dumps
  2019-01-29 15:33 ` Andrew Lunn
@ 2019-01-29 15:39   ` Russell King - ARM Linux admin
  0 siblings, 0 replies; 3+ messages in thread
From: Russell King - ARM Linux admin @ 2019-01-29 15:39 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: linux-arm-kernel

On Tue, Jan 29, 2019 at 04:33:34PM +0100, Andrew Lunn wrote:
> On Tue, Jan 29, 2019 at 02:14:53PM +0000, Russell King wrote:
> > 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.
> 
> Hi Russell
> 
> Good idea.
> 
> Is it worth also putting a marked at the end? I sometime get crash
> dumps with the stack trace chopped off.

There is already a marker at the end - print_oops_end_marker() prints
an "---[ end trace <hex> ]---" marker.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-29 15:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 14:14 [PATCH] ARM: add "8<--- cut here ---" to kernel dumps Russell King
2019-01-29 15:33 ` Andrew Lunn
2019-01-29 15:39   ` Russell King - ARM Linux admin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).