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: <cc3e08a3-633e-c601-c78e-c4b81bd48ada@iogearbox.net>
Date:   Wed, 3 Jul 2019 17:04:38 +0200
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Jiri Benc <jbenc@...hat.com>, netdev@...r.kernel.org,
        bpf@...r.kernel.org
Cc:     Alexei Starovoitov <ast@...nel.org>,
        Mathieu Xhonneux <m.xhonneux@...il.com>,
        Song Liu <liu.song.a23@...il.com>, Y Song <ys114321@...il.com>
Subject: Re: [PATCH bpf v2] selftests: bpf: fix inlines in test_lwt_seg6local

On 07/02/2019 07:40 PM, Jiri Benc wrote:
> Selftests are reporting this failure in test_lwt_seg6local.sh:
> 
> + ip netns exec ns2 ip -6 route add fb00::6 encap bpf in obj test_lwt_seg6local.o sec encap_srh dev veth2
> Error fetching program/map!
> Failed to parse eBPF program: Operation not permitted
> 
> The problem is __attribute__((always_inline)) alone is not enough to prevent
> clang from inserting those functions in .text. In that case, .text is not
> marked as relocateable.
> 
> See the output of objdump -h test_lwt_seg6local.o:
> 
> Idx Name          Size      VMA               LMA               File off  Algn
>   0 .text         00003530  0000000000000000  0000000000000000  00000040  2**3
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
> 
> This causes the iproute bpf loader to fail in bpf_fetch_prog_sec:
> bpf_has_call_data returns true but bpf_fetch_prog_relo fails as there's no
> relocateable .text section in the file.
> 
> To fix this, convert to 'static __always_inline'.
> 
> v2: Use 'static __always_inline' instead of 'static inline
>     __attribute__((always_inline))'
> 
> Fixes: c99a84eac026 ("selftests/bpf: test for seg6local End.BPF action")
> Signed-off-by: Jiri Benc <jbenc@...hat.com>

Applied, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ