lkml.org 
[lkml]   [2012]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 70/74] Kbuild, lto: Handle longer symbols in kallsyms.c
Date
From: Andi Kleen <ak@linux.intel.com>

Also warn for too long symbols

Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
scripts/kallsyms.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 487ac6f..acde016 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;
@@ -111,6 +111,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.7.7.6


\
 
 \ /
  Last update: 2012-08-19 06:41    [W:0.521 / U:9.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site