From: Eugene Loh <[email protected]>
When checking for symbols with excessively long names,
account for null terminating character.
Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c")
Signed-off-by: Eugene Loh <[email protected]>
---
scripts/kallsyms.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
index 77cebad..f75e7bd 100644
--- a/scripts/kallsyms.c
+++ b/scripts/kallsyms.c
@@ -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;
--
1.8.3.1
On Thu, 17 Jan 2019 at 23:46, <[email protected]> wrote:
>
> From: Eugene Loh <[email protected]>
>
> When checking for symbols with excessively long names,
> account for null terminating character.
>
> Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c")
> Signed-off-by: Eugene Loh <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
> ---
> scripts/kallsyms.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 77cebad..f75e7bd 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -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;
> --
> 1.8.3.1
>
(+ masahiro)
On Fri, 25 Jan 2019 at 14:28, Ard Biesheuvel <[email protected]> wrote:
>
> On Thu, 17 Jan 2019 at 23:46, <[email protected]> wrote:
> >
> > From: Eugene Loh <[email protected]>
> >
> > When checking for symbols with excessively long names,
> > account for null terminating character.
> >
> > Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c")
> > Signed-off-by: Eugene Loh <[email protected]>
>
> Acked-by: Ard Biesheuvel <[email protected]>
>
> > ---
> > scripts/kallsyms.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> > index 77cebad..f75e7bd 100644
> > --- a/scripts/kallsyms.c
> > +++ b/scripts/kallsyms.c
> > @@ -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;
> > --
> > 1.8.3.1
> >
On Fri, Jan 25, 2019 at 10:30 PM Ard Biesheuvel
<[email protected]> wrote:
>
> (+ masahiro)
>
> On Fri, 25 Jan 2019 at 14:28, Ard Biesheuvel <[email protected]> wrote:
> >
> > On Thu, 17 Jan 2019 at 23:46, <[email protected]> wrote:
> > >
> > > From: Eugene Loh <[email protected]>
> > >
> > > When checking for symbols with excessively long names,
> > > account for null terminating character.
> > >
> > > Fixes: f3462aa952cf ("Kbuild: Handle longer symbols in kallsyms.c")
> > > Signed-off-by: Eugene Loh <[email protected]>
> >
> > Acked-by: Ard Biesheuvel <[email protected]>
> >
> > > ---
> > > scripts/kallsyms.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> > > index 77cebad..f75e7
Applied to linux-kbuid/fixes.
Thanks!
--
Best Regards
Masahiro Yamada