Skip to content

Always allow sleepable and fmod_ret programs on syscalls

Viktor Malik bpf 3 versions – Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest3 patches 1 replyApplied 3/3
  2. v23 patches 5 repliesSuperseded
  3. v13 patches 10 repliesSuperseded

Changes in v3 from the cover letter

- Handle LoongArch (Leon)
- Add Kumar's and Leon's acks

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Always allow sleepable programs on syscallskernel/bpf/verifier.c+54 -60 repliesApplied
2/3bpf: Always allow fmod_ret programs on syscallskernel/bpf/verifier.c+19 -100 repliesApplied
3/3selftests/bpf: Move sleepable refcounted_kptr tests to syscallstools/testing/selftests/bpf/progs/refcounted_kptr.c tools/testing/selftests/bpf/progs/refcounted_kptr_fail.c+3 -30 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchKumar Kartikeya DwivediLeon HwangJiri Olsa
SeriesA-b
1/3A-b A-b
2/3A-b A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v3 thread

Cover letter [PATCH bpf-next v3 0/3] Always allow sleepable and fmod_ret programs on syscalls

Both sleepable and fmod_ret programs are only allowed on selected functions. For convenience, the error injection list was originally used.

When error injection is disabled, that list is empty and sleepable tracing programs, as well as fmod_ret programs, are effectively unavailable.

This patch series addresses the issue by at least enabling sleepable and fmod_ret programs on syscalls, if error injection is disabled. More details on why syscalls are used can be found in [1].

[1] https://lore.kernel.org/bpf/CAADnVQK6qP8izg+k9yV0vdcT-+=axtFQ2fKw7D-2Ei-V6WS5Dw@mail.gmail.com/

Changes in v3:
- Handle LoongArch (Leon)
- Add Kumar's and Leon's acks

Changes in v2:
- Check "sys_" prefix instead of "sys" for powerpc syscalls (AI review)
- Add link to the original discussion (Kumar)
- Add explanation why arch syscall prefixes are hard-coded (Leon)

Viktor Malik (3):
bpf: Always allow sleepable programs on syscalls
bpf: Always allow fmod_ret programs on syscalls selftests/bpf: Move sleepable refcounted_kptr tests to syscalls

 kernel/bpf/verifier.c                         | 85 ++++++++++++++++---
 .../selftests/bpf/progs/refcounted_kptr.c     |  4 +-
 .../bpf/progs/refcounted_kptr_fail.c          |  2 +-
 3 files changed, 74 insertions(+), 17 deletions(-)
Signature · 1 line
2.53.0