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] [day] [month] [year] [list]
Message-ID: <CAADnVQ+_6Rkynsoqe51G-jOxOfQq54QMmzbCoZJSKe_yrufTpg@mail.gmail.com>
Date:   Wed, 22 Apr 2020 22:27:49 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     Yoshiki Komachi <komachi.yoshiki@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        Andrii Nakryiko <andriin@...com>,
        Network Development <netdev@...r.kernel.org>,
        bpf <bpf@...r.kernel.org>
Subject: Re: [PATCH bpf-next] bpf_helpers.h: Add note for building with
 vmlinux.h or linux/types.h

On Mon, Apr 20, 2020 at 5:05 PM Yoshiki Komachi
<komachi.yoshiki@...il.com> wrote:
>
> The following error was shown when a bpf program was compiled without
> vmlinux.h auto-generated from BTF:
>
>  # clang -I./linux/tools/lib/ -I/lib/modules/$(uname -r)/build/include/ \
>    -O2 -Wall -target bpf -emit-llvm -c bpf_prog.c -o bpf_prog.bc
>  ...
>  In file included from linux/tools/lib/bpf/bpf_helpers.h:5:
>  linux/tools/lib/bpf/bpf_helper_defs.h:56:82: error: unknown type name '__u64'
>  ...
>
> It seems that bpf programs are intended for being built together with
> the vmlinux.h (which will have all the __u64 and other typedefs). But
> users may mistakenly think "include <linux/types.h>" is missing
> because the vmlinux.h is not common for non-bpf developers. IMO, an
> explicit comment therefore should be added to bpf_helpers.h as this
> patch shows.
>
> Signed-off-by: Yoshiki Komachi <komachi.yoshiki@...il.com>

Applied. Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ