Skip to content

RFC unprivileged BPF_PROG_TEST_RUN

Edwin Peer bpf netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: defer capability checks until program attachinclude/linux/filter.h kernel/bpf/syscall.c+9 -50 replies
2/2bpf: relax CAP_SYS_ADMIN requirement for BPF_PROG_TEST_RUNkernel/bpf/syscall.c+11 -70 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH bpf-next 0/2] unprivileged BPF_PROG_TEST_RUN

Being able to load, verify and test BPF programs in unprivileged build environments is desirable. The two phase load and then test API makes this goal difficult to achieve, since relaxing permissions for BPF_PROG_TEST_RUN alone would be insufficient.

The approach taken in this proposal defers CAP_SYS_ADMIN checks until program attach time in order to unencumber BPF_PROG_LOAD.

Edwin Peer (2):
bpf: defer capability checks until program attach
bpf: relax CAP_SYS_ADMIN requirement for BPF_PROG_TEST_RUN

 include/linux/filter.h |  3 ++-
 kernel/bpf/syscall.c   | 27 +++++++++++++++++----------
 2 files changed, 19 insertions(+), 11 deletions(-)
Signature · 1 line
2.24.1