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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 7 Oct 2019 09:42:59 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Stanislav Fomichev <sdf@...ichev.me>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>
Subject: Re: [PATCH v3 bpf-next 1/4] libbpf: stop enforcing kern_version,
 populate it for users

On Mon, Oct 7, 2019 at 9:14 AM Stanislav Fomichev <sdf@...ichev.me> wrote:
>
> On 10/04, Andrii Nakryiko wrote:
> > Kernel version enforcement for kprobes/kretprobes was removed from
> > 5.0 kernel in 6c4fc209fcf9 ("bpf: remove useless version check for prog load").
> > Since then, BPF programs were specifying SEC("version") just to please
> > libbpf. We should stop enforcing this in libbpf, if even kernel doesn't
> > care. Furthermore, libbpf now will pre-populate current kernel version
> > of the host system, in case we are still running on old kernel.
>
> [..]
> > This patch also removes __bpf_object__open_xattr from libbpf.h, as
> > nothing in libbpf is relying on having it in that header. That function
> > was never exported as LIBBPF_API and even name suggests its internal
> > version. So this should be safe to remove, as it doesn't break ABI.
> This gives me the following (I don't know why bpftool was allowed to link
> against non-LIBBPF_API exposed function):
>
> + make -s -j72 -C tools/bpf/bpftool
>
> prog.c: In function ‘load_with_options’:
> prog.c:1227:8: warning: implicit declaration of function ‘__bpf_object__open_xattr’; did you mean ‘bpf_object__open_xattr’? [-Wimplicit-function-declaration]
>   obj = __bpf_object__open_xattr(&open_attr, bpf_flags);
>         ^~~~~~~~~~~~~~~~~~~~~~~~
>         bpf_object__open_xattr
> prog.c:1227:8: warning: nested extern declaration of ‘__bpf_object__open_xattr’ [-Wnested-externs]
> prog.c:1227:6: warning: assignment to ‘struct bpf_object *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
>   obj = __bpf_object__open_xattr(&open_attr, bpf_flags);
>       ^
>

Cool, I somehow didn't find any users of that API, but I looked only
in libbpf and selftests, forgot about bpftool. I'll fix it to use new
APIs.

Thanks for reporting!



> Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h' differs from latest version at 'include/uapi/linux/if_link.h'
> /usr/bin/ld: prog.o: in function `load_with_options':
> prog.c:(.text+0x49b): undefined reference to `__bpf_object__open_xattr'
> collect2: error: ld returned 1 exit statu
>
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
> > ---

[...]

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ