[PATCH bpf v2 0/2] bpf: Allow fall back to interpreter for programs with stack size <= 512

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

 



This change restores interpreter fallback capability for BPF programs with
stack size <= 512 bytes when jit fails.
Add selftest for socket filter to test it.

changes:
v2:
- Addressed comments from Alexei
- Add selftest

v1:
 https://lore.kernel.org/all/20250805115513.4018532-1-kafai.wan@xxxxxxxxx/

---
KaFai Wan (2):
  bpf: Allow fall back to interpreter for programs with stack size <=
    512
  selftests/bpf: Add socket filter attach test

 kernel/bpf/core.c                             |  16 ++-
 .../selftests/bpf/prog_tests/socket_filter.c  | 124 ++++++++++++++++++
 .../selftests/bpf/progs/socket_filter.c       |  16 +++
 3 files changed, 149 insertions(+), 7 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/socket_filter.c
 create mode 100644 tools/testing/selftests/bpf/progs/socket_filter.c

-- 
2.43.0





[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