Re: [PATCH bpf v3 1/1] bpf: Allow fall back to interpreter for programs with stack size <= 512

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2025-09-09 at 22:46 +0800, KaFai Wan wrote:
> 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 <nbd@xxxxxxxx>
> Closes: https://lore.kernel.org/bpf/2e267b4b-0540-45d8-9310-e127bf95fc63@xxxxxxxx/
> Fixes: 6ebc5030e0c5 ("bpf: Fix array bounds error with may_goto")
> Signed-off-by: KaFai Wan <kafai.wan@xxxxxxxxx>
> ---
> changes:
> v3:
> - Remove the selftest (Puranjay and Eduard)
> 
> v2:
> - Addressed comments from Alexei
> - Add selftest
>  https://lore.kernel.org/all/20250813152958.3107403-1-kafai.wan@xxxxxxxxx/
> 
> v1:
>  https://lore.kernel.org/all/20250805115513.4018532-1-kafai.wan@xxxxxxxxx/
> ---

Acked-by: Eduard Zingerman <eddyz87@xxxxxxxxx>

[...]





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux