Skip to content

Conversation

@kernel-patches-daemon-bpf-rc
Copy link

Pull request for series with
subject: bpf: Allow fall back to interpreter for programs with stack size <= 512
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=988432

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: f3af62b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=988432
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: f3af62b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=988432
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 911c035
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=988432
version: 1

@kernel-patches-daemon-bpf-rc
Copy link
Author

Upstream branch: 15a3b79
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=988432
version: 1

OpenWRT users reported regression on ARMv6 devices after updating to latest
HEAD, where tcpdump filter:

tcpdump -i mon1 \
"not wlan addr3 3c37121a2b3c and not wlan addr2 184ecbca2a3a \
and not wlan addr2 14130b4d3f47 and not wlan addr2 f0f61cf440b7 \
and not wlan addr3 a84b4dedf471 and not wlan addr3 d022be17e1d7 \
and not wlan addr3 5c497967208b and not wlan addr2 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")
Fixes: 86bc9c7 ("bpf: Avoid __bpf_prog_ret0_warn when jit fails")
Signed-off-by: KaFai Wan <[email protected]>
@kernel-patches-daemon-bpf-rc
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=988432 expired. Closing PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants