From 20f05569fecf5d6c072cf4a1fa00beb44bcf4075 Mon Sep 17 00:00:00 2001 From: Huibin Hong Date: Fri, 19 Aug 2022 03:46:06 +0000 Subject: [PATCH] arm64: process: show_regs show_extra_register_data with 512*2 bytes Signed-off-by: Huibin Hong Change-Id: If84fe2946e9fc8331d36e71a1661d2b75d06cadd --- arch/arm64/kernel/process.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c index 0c9f9d386a00..48d4f785e311 100644 --- a/arch/arm64/kernel/process.c +++ b/arch/arm64/kernel/process.c @@ -279,10 +279,10 @@ static void show_data(unsigned long addr, int nbytes, const char *name) * don't attempt to dump non-kernel addresses or * values that are probably just small negative numbers */ - if (addr < PAGE_OFFSET || addr > -256UL) + if (addr < PAGE_OFFSET || addr > -4096UL) return; - printk("\n%s: %#lx:\n", name, addr); + printk("\n%s: %#lx:\n", name, addr + nbytes / 2); /* * round address down to a 32 bit boundary @@ -298,7 +298,11 @@ static void show_data(unsigned long addr, int nbytes, const char *name) * just display low 16 bits of address to keep * each line of the dump < 80 characters */ - printk("%04lx ", (unsigned long)p & 0xffff); + if (i == (nlines / 2)) + printk("%04lx*", (unsigned long)p & 0xffff); + else + printk("%04lx ", (unsigned long)p & 0xffff); + for (j = 0; j < 8; j++) { u32 data; @@ -383,7 +387,7 @@ void show_regs(struct pt_regs * regs) dump_backtrace(regs, NULL, KERN_DEFAULT); if (!user_mode(regs)) - show_extra_register_data(regs, 256); + show_extra_register_data(regs, 512); } EXPORT_SYMBOL_GPL(show_regs);