Skip to contentSkip to conversation

powerpc/xmon: symbol lookup length fixed

PATCH Applied Mukesh Kumar Chaurasiya 2 participants 2 messages Oct 24, 2024 – Nov 17, 2024 PowerPC

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---
 arch/powerpc/xmon/xmon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

ChangeLog v1 -> v2:
- Commit message updated with commands

arch/powerpc/xmon/xmon.c +3 -3
index e6cddbb2305f..22b8b5cc4df0 100644
@@ -3662,7 +3662,7 @@ symbol_lookup(void)
 	int type = inchar();
 	unsigned long addr, cpu;
 	void __percpu *ptr = NULL;
-	static char tmp[64];
+	static char tmp[KSYM_NAME_LEN];
 
 	switch (type) {
 	case 'a':
@@ -3671,7 +3671,7 @@ symbol_lookup(void)
 		termch = 0;
 		break;
 	case 's':
-		getstring(tmp, 64);
+		getstring(tmp, KSYM_NAME_LEN);
 		if (setjmp(bus_error_jmp) == 0) {
 			catch_memory_errors = 1;
 			sync();
@@ -3686,7 +3686,7 @@ symbol_lookup(void)
 		termch = 0;
 		break;
 	case 'p':
-		getstring(tmp, 64);
+		getstring(tmp, KSYM_NAME_LEN);
 		if (setjmp(bus_error_jmp) == 0) {
 			catch_memory_errors = 1;
 			sync();
Signature · 1 line
2.47.0