lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 7 Feb 2019 11:23:19 -0800
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
Cc:     Andrii Nakryiko <andriin@...com>, Yonghong Song <yhs@...com>,
        Song Liu <songliubraving@...com>,
        Alexei Starovoitov <ast@...com>, Martin Lau <kafai@...com>,
        netdev@...r.kernel.org, kernel-team@...com
Subject: Re: [PATCH bpf-next] tools/bpf: add missing strings.h include

On Thu, Feb 7, 2019 at 11:21 AM Arnaldo Carvalho de Melo
<acme@...nel.org> wrote:
>
> Em Thu, Feb 07, 2019 at 09:50:27AM -0800, Andrii Nakryiko escreveu:
> > Few files in libbpf are using bzero() function (defined in strings.h header), but
> > don't include corresponding header. When libbpf is added as a dependency to pahole,
> > this undeterministically causes warnings on some machines:
> >
> > bpf.c:225:2: warning: implicit declaration of function ‘bzero’ [-Wimplicit-function-declaration]
> >   bzero(&attr, sizeof(attr));
>      ^~~~~
>
> You forgot your:
>
> Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> And a:
>
> Reported-by: Arnaldo Carvalho de Melo <acme@...hat.com>
>
> :-)
>

argh... v2 incoming, thanks!

> - Arnaldo
>
> > ---
> >  tools/lib/bpf/bpf.c    | 1 +
> >  tools/lib/bpf/btf.c    | 1 +
> >  tools/lib/bpf/libbpf.c | 1 +
> >  3 files changed, 3 insertions(+)
> >
> > diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
> > index 3defad77dc7a..92fd27fe0599 100644
> > --- a/tools/lib/bpf/bpf.c
> > +++ b/tools/lib/bpf/bpf.c
> > @@ -22,6 +22,7 @@
> >   */
> >
> >  #include <stdlib.h>
> > +#include <strings.h>
> >  #include <memory.h>
> >  #include <unistd.h>
> >  #include <asm/unistd.h>
> > diff --git a/tools/lib/bpf/btf.c b/tools/lib/bpf/btf.c
> > index ab6528c935a1..4324eb47d214 100644
> > --- a/tools/lib/bpf/btf.c
> > +++ b/tools/lib/bpf/btf.c
> > @@ -4,6 +4,7 @@
> >  #include <stdio.h>
> >  #include <stdlib.h>
> >  #include <string.h>
> > +#include <strings.h>
> >  #include <unistd.h>
> >  #include <errno.h>
> >  #include <linux/err.h>
> > diff --git a/tools/lib/bpf/libbpf.c b/tools/lib/bpf/libbpf.c
> > index 47969aa0faf8..8d64ada5f728 100644
> > --- a/tools/lib/bpf/libbpf.c
> > +++ b/tools/lib/bpf/libbpf.c
> > @@ -18,6 +18,7 @@
> >  #include <libgen.h>
> >  #include <inttypes.h>
> >  #include <string.h>
> > +#include <strings.h>
> >  #include <unistd.h>
> >  #include <fcntl.h>
> >  #include <errno.h>
> > --
> > 2.17.1
>
> --
>
> - Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ