Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable ARM configs with BPF enabled in -next with clang-13 #807

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nathanchance
Copy link
Member

After commit 9aa0ebde0014 ("bpf, verifier: Improve precision of BPF_MUL"), 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, 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.

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant