[PATCH v2] powerpc/xmon: symbol lookup length fixed

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE669d

2 messages, 2 authors, 2024-11-17 · open the first message on its own page

[PATCH v2] powerpc/xmon: symbol lookup length fixed

From: Mukesh Kumar Chaurasiya <hidden>
Date: 2024-10-24 19:13:14

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 <redacted>
---
 arch/powerpc/xmon/xmon.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

ChangeLog v1 -> v2:
  - Commit message updated with commands
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index e6cddbb2305f..22b8b5cc4df0 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -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();
-- 
2.47.0

Re: [PATCH v2] powerpc/xmon: symbol lookup length fixed

From: Michael Ellerman <hidden>
Date: 2024-11-17 12:25:31

On Fri, 25 Oct 2024 00:42:33 +0530, Mukesh Kumar Chaurasiya wrote:
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
Applied to powerpc/next.

[1/1] powerpc/xmon: symbol lookup length fixed
      https://git.kernel.org/powerpc/c/b196db2f536645eda7684655f3fae913e33fda4b

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help