-
Notifications
You must be signed in to change notification settings - Fork 148
bpf: Allow fall back to interpreter for programs with stack size <= 512 #9473
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
Conversation
Upstream branch: 8f5ae30 |
4755b1f
to
0b17fdf
Compare
Upstream branch: 7572a47 |
b9be668
to
fa9fd2d
Compare
0b17fdf
to
7246b0a
Compare
Upstream branch: e4414b0 |
fa9fd2d
to
a48f5f2
Compare
7246b0a
to
2d8f434
Compare
Upstream branch: 27861fc |
a48f5f2
to
4670222
Compare
2d8f434
to
74cea96
Compare
OpenWRT users reported regression on ARMv6 devices after updating to latest HEAD, where tcpdump filter: tcpdump "not ether host 3c37121a2b3c and not ether host 184ecbca2a3a \ and not ether host 14130b4d3f47 and not ether host f0f61cf440b7 \ and not ether host a84b4dedf471 and not ether host d022be17e1d7 \ and not ether host 5c497967208b and not ether host 706655784d5b" fails with warning: "Kernel filter failed: No error information" when using config: # CONFIG_BPF_JIT_ALWAYS_ON is not set CONFIG_BPF_JIT_DEFAULT_ON=y The issue arises because commits: 1. "bpf: Fix array bounds error with may_goto" changed default runtime to __bpf_prog_ret0_warn when jit_requested = 1 2. "bpf: Avoid __bpf_prog_ret0_warn when jit fails" returns error when jit_requested = 1 but jit fails This change restores interpreter fallback capability for BPF programs with stack size <= 512 bytes when jit fails. Reported-by: Felix Fietkau <[email protected]> Closes: https://lore.kernel.org/bpf/[email protected]/ Fixes: 6ebc503 ("bpf: Fix array bounds error with may_goto") Signed-off-by: KaFai Wan <[email protected]>
This test verifies socket filter attachment functionality on architectures supporting either BPF JIT compilation or the interpreter. It specifically validates the fallback to interpreter behavior when JIT fails, particularly targeting ARMv6 devices with the following configuration: # CONFIG_BPF_JIT_ALWAYS_ON is not set CONFIG_BPF_JIT_DEFAULT_ON=y Signed-off-by: KaFai Wan <[email protected]>
Upstream branch: dd9de52 |
4670222
to
d1a5255
Compare
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=991061 expired. Closing PR. |
Pull request for series with
subject: bpf: Allow fall back to interpreter for programs with stack size <= 512
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=991061