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]
Message-ID: <0a5bf608-bb15-c116-8e58-7224b6c3b62f@fb.com>
Date:   Tue, 24 Sep 2019 15:43:54 +0000
From:   Yonghong Song <yhs@...com>
To:     Shuah Khan <skhan@...uxfoundation.org>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>,
        Daniel Borkmann <daniel@...earbox.net>
CC:     "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
        Networking <netdev@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Andrii Nakryiko <andriin@...com>
Subject: Re: Linux 5.4 - bpf test build fails



On 9/24/19 8:26 AM, Shuah Khan wrote:
> Hi Alexei and Daniel,
> 
> bpf test doesn't build on Linux 5.4 mainline. Do you know what's
> happening here.
> 
> 
> make -C tools/testing/selftests/bpf/
> 
> -c progs/test_core_reloc_ptr_as_arr.c -o - || echo "clang failed") | \
> llc -march=bpf -mcpu=generic  -filetype=obj -o 
> /mnt/data/lkml/linux_5.4/tools/testing/selftests/bpf/test_core_reloc_ptr_as_arr.o 
> 
> progs/test_core_reloc_ptr_as_arr.c:25:6: error: use of unknown builtin
>        '__builtin_preserve_access_index' [-Wimplicit-function-declaration]
>          if (BPF_CORE_READ(&out->a, &in[2].a))
>              ^
> ./bpf_helpers.h:533:10: note: expanded from macro 'BPF_CORE_READ'
>                         __builtin_preserve_access_index(src))
>                         ^
> progs/test_core_reloc_ptr_as_arr.c:25:6: warning: incompatible integer to
>        pointer conversion passing 'int' to parameter of type 'const void *'
>        [-Wint-conversion]
>          if (BPF_CORE_READ(&out->a, &in[2].a))
>              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ./bpf_helpers.h:533:10: note: expanded from macro 'BPF_CORE_READ'
>                         __builtin_preserve_access_index(src))
>                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 warning and 1 error generated.
> llc: error: llc: <stdin>:1:1: error: expected top-level entity
> clang failed
> 
> Also
> 
> make TARGETS=bpf kselftest fails as well. Dependency between
> tools/lib/bpf and the test. How can we avoid this type of
> dependency or resolve it in a way it doesn't result in build
> failures?

Thanks, Shuah.

The clang __builtin_preserve_access_index() intrinsic is
introduced in LLVM9 (which just released last week) and
the builtin and other CO-RE features are only supported
in LLVM10 (current development branch) with more bug fixes
and added features.

I think we should do a feature test for llvm version and only
enable these tests when llvm version >= 10.

Andrii, what do you think?

> 
> thanks,
> -- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ