提交 6db2983c 编写于 作者: E Eugene Loh 提交者: Masahiro Yamada

kallsyms: Handle too long symbols in kallsyms.c

When checking for symbols with excessively long names,
account for null terminating character.

Fixes: f3462aa9 ("Kbuild: Handle longer symbols in kallsyms.c")
Signed-off-by: NEugene Loh <eugene.loh@oracle.com>
Acked-by: NArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
上级 f17b5f06
......@@ -118,8 +118,8 @@ static int read_symbol(FILE *in, struct sym_entry *s)
fprintf(stderr, "Read error or end of file.\n");
return -1;
}
if (strlen(sym) > KSYM_NAME_LEN) {
fprintf(stderr, "Symbol %s too long for kallsyms (%zu vs %d).\n"
if (strlen(sym) >= KSYM_NAME_LEN) {
fprintf(stderr, "Symbol %s too long for kallsyms (%zu >= %d).\n"
"Please increase KSYM_NAME_LEN both in kernel and kallsyms.c\n",
sym, strlen(sym), KSYM_NAME_LEN);
return -1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册