@@ -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 */