summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorVineet Gupta <vineet.gupta@linux.dev>2026-08-24 14:01:42 -0700
committerDaniel Borkmann <daniel@iogearbox.net>2026-08-26 18:29:36 +0200
commit48b69cc8825d411a4c4df32de854434e9235a1b0 (patch)
treedad8d9a0c608a76206b8db299e4ec6c9ea1d3195 /scripts/Makefile.thinlto
parent8928f5ffdb65f0f69babb006123d256bd774f2d3 (diff)
downloadlinux-next-48b69cc8825d411a4c4df32de854434e9235a1b0.tar.gz
linux-next-48b69cc8825d411a4c4df32de854434e9235a1b0.zip
selftests/bpf: Enable some of the blocked cpuv4 instruction tests for bpf-gcc
A bunch of tests are gated behind clang only __clang_major__ and thus fail to build under BPF_GCC. What's worse is, before the prev patch they were also declared as passing/OK. This need not be because (a) bpf-gcc does support the feature in codegen and (b) also advertises correctly with feature support preprocessor macros: __BPF_FEATURE_BSWAP, __BPF_FEATURE_GOTOL, __BPF_FEATURE_LDSX, __BPF_FEATURE_MOVSX, __BPF_FEATURE_SDIV_SMOD, __BPF_FEATURE_ST So loosen up the gates to also add specific feature check. clang >=18 has to stay, despite it being true for so long: clang only defines __BPF_FEATURE_MOVSX and friends at -mcpu=v4, but assembles the inline asm at -mcpu=v3 too, and dropping it would remove these tests from the default test_progs flavour where they run today. Since bpf-gcc doesn't support addr_space_cast, wrap the corresponding tests under __BPF_FEATURE_ADDR_SPACE_CAST to skip under it. And also move the map under that guard so that a bpf-gcc object does not declare an arena map that no program in it references. Recovered under BPF_GCC (programs per object, was 1 dummy each): verifier_sdiv 80 verifier_movsx 17 verifier_ldsx 14 (20 under clang; 5 arena tests, kfunc_root and the arena map stay clang-only) verifier_bswap 13 CAN_USE_GOTOL and CAN_USE_BPF_ST only gate parts of a file, so those were not dummies to begin with: compute_live_registers 17 -> 19 (21 under clang) verifier_gotol 1 -> 2 verifier_iterating_callbacks 34 -> 35 The clang builds are unchanged: verifier_ldsx still emits 20 programs under the cpuv4 flavour. One thing left alone: verifier_load_acquire.c and verifier_store_release.c stay clang-only, and their gates are correct as gas doesn't implement those (experimental -mxbpf not implemented at all). FWIW LLVM groups those under -mcpu=v4 and defines __BPF_FEATURE_LOAD_ACQ_STORE_REL there. Signed-off-by: Vineet Gupta <vineet.gupta@linux.dev> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/bpf/20260824210142.3933580-4-vineet.gupta@linux.dev
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions