linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Kbuild: Handle too long symbols in kallsyms.c
@ 2019-01-17 22:46 eugene.loh
  2019-01-25 13:28 ` Ard Biesheuvel
  0 siblings, 1 reply; 4+ messages in thread
From: eugene.loh @ 2019-01-17 22:46 UTC (permalink / raw)
  To: linux-kernel, ard.biesheuvel, ak, andi

From: Eugene Loh <eugene.loh@oracle.com>

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 <eugene.loh@oracle.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kbuild: Handle too long symbols in kallsyms.c
  2019-01-17 22:46 [PATCH] Kbuild: Handle too long symbols in kallsyms.c eugene.loh
@ 2019-01-25 13:28 ` Ard Biesheuvel
  2019-01-25 13:29   ` Ard Biesheuvel
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2019-01-25 13:28 UTC (permalink / raw)
  To: eugene.loh; +Cc: Linux Kernel Mailing List, Andi Kleen, andi

On Thu, 17 Jan 2019 at 23:46, <eugene.loh@oracle.com> wrote:
>
> From: Eugene Loh <eugene.loh@oracle.com>
>
> 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 <eugene.loh@oracle.com>

Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---
>  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
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kbuild: Handle too long symbols in kallsyms.c
  2019-01-25 13:28 ` Ard Biesheuvel
@ 2019-01-25 13:29   ` Ard Biesheuvel
  2019-01-28  4:03     ` Masahiro Yamada
  0 siblings, 1 reply; 4+ messages in thread
From: Ard Biesheuvel @ 2019-01-25 13:29 UTC (permalink / raw)
  To: eugene.loh, Masahiro Yamada, Linux Kbuild mailing list
  Cc: Linux Kernel Mailing List, Andi Kleen, andi

(+ masahiro)

On Fri, 25 Jan 2019 at 14:28, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
>
> On Thu, 17 Jan 2019 at 23:46, <eugene.loh@oracle.com> wrote:
> >
> > From: Eugene Loh <eugene.loh@oracle.com>
> >
> > 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 <eugene.loh@oracle.com>
>
> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>
> > ---
> >  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
> >

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Kbuild: Handle too long symbols in kallsyms.c
  2019-01-25 13:29   ` Ard Biesheuvel
@ 2019-01-28  4:03     ` Masahiro Yamada
  0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2019-01-28  4:03 UTC (permalink / raw)
  To: Ard Biesheuvel, eugene.loh
  Cc: Linux Kbuild mailing list, Linux Kernel Mailing List, Andi Kleen,
	Andi Kleen

On Fri, Jan 25, 2019 at 10:30 PM Ard Biesheuvel
<ard.biesheuvel@linaro.org> wrote:
>
> (+ masahiro)
>
> On Fri, 25 Jan 2019 at 14:28, Ard Biesheuvel <ard.biesheuvel@linaro.org> wrote:
> >
> > On Thu, 17 Jan 2019 at 23:46, <eugene.loh@oracle.com> wrote:
> > >
> > > From: Eugene Loh <eugene.loh@oracle.com>
> > >
> > > 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 <eugene.loh@oracle.com>
> >
> > Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> >
> > > ---
> > >  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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-01-28  4:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-17 22:46 [PATCH] Kbuild: Handle too long symbols in kallsyms.c eugene.loh
2019-01-25 13:28 ` Ard Biesheuvel
2019-01-25 13:29   ` Ard Biesheuvel
2019-01-28  4:03     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).