Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/xmon: symbol lookup length fixed

Currently this cannot lookup symbol beyond 64 characters in some cases
like "ls", "lp" and "t"

Fix this by using KSYM_NAME_LEN instead of fixed 64 characters

Signed-off-by: Mukesh Kumar Chaurasiya <mchauras@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://patch.msgid.link/20241024191232.1570894-2-mchauras@linux.ibm.com

authored by

Mukesh Kumar Chaurasiya and committed by
Michael Ellerman
b196db2f bfd9c145

+3 -3
+3 -3
arch/powerpc/xmon/xmon.c
··· 3662 3662 int type = inchar(); 3663 3663 unsigned long addr, cpu; 3664 3664 void __percpu *ptr = NULL; 3665 - static char tmp[64]; 3665 + static char tmp[KSYM_NAME_LEN]; 3666 3666 3667 3667 switch (type) { 3668 3668 case 'a': ··· 3671 3671 termch = 0; 3672 3672 break; 3673 3673 case 's': 3674 - getstring(tmp, 64); 3674 + getstring(tmp, KSYM_NAME_LEN); 3675 3675 if (setjmp(bus_error_jmp) == 0) { 3676 3676 catch_memory_errors = 1; 3677 3677 sync(); ··· 3686 3686 termch = 0; 3687 3687 break; 3688 3688 case 'p': 3689 - getstring(tmp, 64); 3689 + getstring(tmp, KSYM_NAME_LEN); 3690 3690 if (setjmp(bus_error_jmp) == 0) { 3691 3691 catch_memory_errors = 1; 3692 3692 sync();