Skip to content

Commit 19233c4

Browse files
committed
generator: Disable ARM configs with BPF enabled in -next 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 de47851 commit 19233c4

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

generator/yml/0009-llvm-13.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,23 @@
6464
# Next #
6565
##########
6666
- {<< : *arm32_v5, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
67-
- {<< : *arm32_v6, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
67+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
68+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
69+
# - {<< : *arm32_v6, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
6870
- {<< : *arm32_v7, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
6971
- {<< : *arm32_v7_t, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7072
- {<< : *arm32_imx, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7173
- {<< : *arm32_omap, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7274
- {<< : *arm32_lpae_fp, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
73-
- {<< : *arm32_allmod, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
75+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
76+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
77+
# - {<< : *arm32_allmod, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
7478
- {<< : *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}
79+
# BPF uses check_mul_overflow() with a 'long long' value, which is broken prior to clang-14:
80+
# https://github.com/llvm/llvm-project/commit/5c91b98c5d45243352bf10262454bcac77cd3fed
81+
# - {<< : *arm32_allyes, << : *next, << : *llvm_full, boot: false, << : *llvm_13}
82+
# - {<< : *arm32_alpine, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
83+
# - {<< : *arm32_suse, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7884
- {<< : *arm64, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
7985
- {<< : *arm64_lto_full, << : *next, << : *llvm_full, boot: true, << : *llvm_13}
8086
- {<< : *arm64_lto_thin, << : *next, << : *llvm_full, boot: true, << : *llvm_13}

0 commit comments

Comments
 (0)