Skip to content

Commit 96dc364

Browse files
committed
generator: Disable ARM configs with BPF enabled in -next and mainline with clang-13
After commit 9aa0ebde0014 ("bpf, verifier: Improve precision of BPF_MUL") [1], there is an error in certain ARM configurations that enable CONFIG_BPF_SYSCALL: ld.lld: error: undefined symbol: __mulodi4 >>> referenced by verifier.c:14221 (/builds/linux/kernel/bpf/verifier.c:14221) >>> kernel/bpf/verifier.o:(adjust_reg_min_max_vals) in archive vmlinux.a >>> referenced by verifier.c:14222 (/builds/linux/kernel/bpf/verifier.c:14222) >>> kernel/bpf/verifier.o:(adjust_reg_min_max_vals) in archive vmlinux.a >>> referenced by verifier.c:14223 (/builds/linux/kernel/bpf/verifier.c:14223) >>> kernel/bpf/verifier.o:(adjust_reg_min_max_vals) in archive vmlinux.a >>> referenced 1 more times This was encountered previously [2], where it was fixed in clang-14 and avoided in the kernel with a source code workaround (that ended up being cleaner anyways). This time around, inserting a source code workaround would not be as clean, as it may involve disabling a core part of the kernel on a limited condition (as it only impacts one supported LLVM version and architecture combination) or having a separate code path for this situation. For now, just disable the builds that are impacted by this. If more people notice this problem, we can explore bumping the minimum supported version of LLVM for building `ARCH=arm` to 14. Link: https://git.kernel.org/bpf/bpf-next/c/9aa0ebde0014f01a8ca82adcbf43b92345da0d50 [1] Link: ClangBuiltLinux/linux#1438 [2] Signed-off-by: Nathan Chancellor <[email protected]>
1 parent 985a817 commit 96dc364

File tree

1 file changed

+22
-10
lines changed

1 file changed

+22
-10
lines changed

generator/yml/0009-llvm-13.yml

+22-10
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,23 @@
55
# Mainline #
66
##############
77
- {<< : *arm32_v5, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
8-
- {<< : *arm32_v6, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
8+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
9+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
10+
# - {<< : *arm32_v6, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
911
- {<< : *arm32_v7, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
1012
- {<< : *arm32_v7_t, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
1113
- {<< : *arm32_imx, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
1214
- {<< : *arm32_omap, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
1315
- {<< : *arm32_lpae_fp, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
14-
- {<< : *arm32_allmod, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
16+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
17+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
18+
# - {<< : *arm32_allmod, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
1519
- {<< : *arm32_allno, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
16-
- {<< : *arm32_allyes, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
17-
- {<< : *arm32_alpine, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
18-
- {<< : *arm32_suse, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
20+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
21+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
22+
# - {<< : *arm32_allyes, << : *mainline, << : *llvm_full, boot: false, << : *llvm_13}
23+
# - {<< : *arm32_alpine, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
24+
# - {<< : *arm32_suse, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
1925
- {<< : *arm64, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
2026
- {<< : *arm64_lto_full, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
2127
- {<< : *arm64_lto_thin, << : *mainline, << : *llvm_full, boot: true, << : *llvm_13}
@@ -64,17 +70,23 @@
6470
# Next #
6571
##########
6672
- {<< : *arm32_v5, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
67-
- {<< : *arm32_v6, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
73+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
74+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
75+
# - {<< : *arm32_v6, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
6876
- {<< : *arm32_v7, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
6977
- {<< : *arm32_v7_t, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7078
- {<< : *arm32_imx, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7179
- {<< : *arm32_omap, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7280
- {<< : *arm32_lpae_fp, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
73-
- {<< : *arm32_allmod, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
81+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
82+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
83+
# - {<< : *arm32_allmod, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7484
- {<< : *arm32_allno, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
75-
- {<< : *arm32_allyes, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
76-
- {<< : *arm32_alpine, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
77-
- {<< : *arm32_suse, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
85+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
86+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
87+
# - {<< : *arm32_allyes, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
88+
# - {<< : *arm32_alpine, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
89+
# - {<< : *arm32_suse, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7890
- {<< : *arm64, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7991
- {<< : *arm64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
8092
- {<< : *arm64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_13}

0 commit comments

Comments
 (0)