[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1376182533-17530-2-git-send-email-andi@firstfloor.org>
Date: Sat, 10 Aug 2013 17:55:32 -0700
From: Andi Kleen <andi@...stfloor.org>
To: linux-kernel@...r.kernel.org
Cc: mmarek@...e.cz, linux-kbuild@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>
Subject: [PATCH 2/3] Kbuild: Handle longer symbols in kallsyms.c
From: Andi Kleen <ak@...ux.intel.com>
Also warn for too long symbols
Signed-off-by: Andi Kleen <ak@...ux.intel.com>
---
scripts/kallsyms.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 6940f00..e5af4c5 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -27,7 +27,7 @@
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0]))
#endif
-#define KSYM_NAME_LEN 128
+#define KSYM_NAME_LEN 256
struct sym_entry {
unsigned long long addr;
@@ -118,6 +118,12 @@ static int read_symbol(FILE *in, struct sym_entry *s)
fprintf(stderr, "Read error or end of file.\n");
return -1;
}
+ if (strlen(str) > KSYM_NAME_LEN) {
+ fprintf(stderr, "Symbol %s too long for kallsyms.\n"
+ "Please increae KSYM_NAME_LEN both in kernel and kallsyms.c",
+ str);
+ return -1;
+ }
sym = str;
/* skip prefix char */
--
1.8.3.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists