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:   Mon, 14 Sep 2020 15:49:48 -0700
From:   Song Liu <song@...nel.org>
To:     Andrii Nakryiko <andrii.nakryiko@...il.com>
Cc:     Yonghong Song <yhs@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH bpf-next] libbpf: fix a compilation error with xsk.c for
 ubuntu 16.04

On Mon, Sep 14, 2020 at 3:47 PM Andrii Nakryiko
<andrii.nakryiko@...il.com> wrote:
>
> On Mon, Sep 14, 2020 at 3:32 PM Yonghong Song <yhs@...com> wrote:
> >
> > When syncing latest libbpf repo to bcc, ubuntu 16.04 (4.4.0 LTS kernel)
> > failed compilation for xsk.c:
> >   In file included from /tmp/debuild.0jkauG/bcc/src/cc/libbpf/src/xsk.c:23:0:
> >   /tmp/debuild.0jkauG/bcc/src/cc/libbpf/src/xsk.c: In function ‘xsk_get_ctx’:
> >   /tmp/debuild.0jkauG/bcc/src/cc/libbpf/include/linux/list.h:81:9: warning: implicit
> >   declaration of function ‘container_of’ [-Wimplicit-function-declaration]
> >            container_of(ptr, type, member)
> >            ^
> >   /tmp/debuild.0jkauG/bcc/src/cc/libbpf/include/linux/list.h:83:9: note: in expansion
> >   of macro ‘list_entry’
> >            list_entry((ptr)->next, type, member)
> >   ...
> >   src/cc/CMakeFiles/bpf-static.dir/build.make:209: recipe for target
> >   'src/cc/CMakeFiles/bpf-static.dir/libbpf/src/xsk.c.o' failed
> >
> > Commit 2f6324a3937f ("libbpf: Support shared umems between queues and devices")
> > added include file <linux/list.h>, which uses macro "container_of".
> > xsk.c file also includes <linux/ethtool.h> before <linux/list.h>.
> >
> > In a more recent distro kernel, <linux/ethtool.h> includes <linux/kernel.h>
> > which contains the macro definition for "container_of". So compilation is all fine.
> > But in ubuntu 16.04 kernel, <linux/ethtool.h> does not contain <linux/kernel.h>
> > which caused the above compilation error.
> >
> > Let explicitly add <linux/kernel.h> in xsk.c to avoid compilation error
> > in old distro's.
> >
> > Fixes: 2f6324a3937f ("libbpf: Support shared umems between queues and devices")
> > Signed-off-by: Yonghong Song <yhs@...com>
> > ---
>
> Acked-by: Andrii Nakryiko <andriin@...com>

Acked-by: Song Liu <songliubraving@...com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ