]>
Commit | Line | Data |
---|---|---|
36e3f504 SL |
1 | From 9cf4ceebcf06a336d33666e6120b11afe2613eb3 Mon Sep 17 00:00:00 2001 |
2 | From: Eugene Loh <eugene.loh@oracle.com> | |
3 | Date: Thu, 17 Jan 2019 14:46:00 -0800 | |
4 | Subject: kallsyms: Handle too long symbols in kallsyms.c | |
5 | ||
6 | [ Upstream commit 6db2983cd8064808141ccefd75218f5b4345ffae ] | |
7 | ||
8 | When checking for symbols with excessively long names, | |
9 | account for null terminating character. | |
10 | ||
11 | Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c") | |
12 | Signed-off-by: Eugene Loh <eugene.loh@oracle.com> | |
13 | Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> | |
14 | Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> | |
15 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
16 | --- | |
17 | scripts/kallsyms.c | 4 ++-- | |
18 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
19 | ||
20 | diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c | |
21 | index a9186a98a37d..0c9c54b57515 100644 | |
22 | --- a/scripts/kallsyms.c | |
23 | +++ b/scripts/kallsyms.c | |
24 | @@ -120,8 +120,8 @@ static int read_symbol(FILE *in, struct sym_entry *s) | |
25 | fprintf(stderr, "Read error or end of file.\n"); | |
26 | return -1; | |
27 | } | |
28 | - if (strlen(sym) > KSYM_NAME_LEN) { | |
29 | - fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n" | |
30 | + if (strlen(sym) >= KSYM_NAME_LEN) { | |
31 | + fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n" | |
32 | "Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n", | |
33 | sym, strlen(sym), KSYM_NAME_LEN); | |
34 | return -1; | |
35 | -- | |
36 | 2.19.1 | |
37 |