Skip to content

CAP_BPF and CAP_TRACING

Alexei Starovoitov bpf linux-api linux-security-module netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest4 patches 1 replyIn review
  2. v33 patches 6 repliesSuperseded
  3. v23 patches 22 repliesSuperseded

Changes in v4 from the cover letter

- rebase and typo fixes
- split selftests into separate patch
- update perf* docs with CAP_TRACING
- add a note to commit log that existing unpriv bpf behavior is not changing

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4capability: introduce CAP_BPF and CAP_TRACINGinclude/linux/capability.h include/uapi/linux/capability.h security/selinux/include/classmap.h+68 -31 reply
2/4bpf: implement CAP_BPFkernel/bpf/arraymap.c kernel/bpf/cgroup.c kernel/bpf/core.c +10 more+38 -300 replies
3/4perf: implement CAP_TRACINGDocumentation/admin-guide/perf-security.rst Documentation/admin-guide/sysctl/kernel.rst arch/powerpc/perf/core-book3s.c +6 more+21 -230 replies
4/4selftests/bpf: use CAP_BPF and CAP_TRACING in teststools/testing/selftests/bpf/test_verifier.c+38 -80 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 bpf-next 0/4] CAP_BPF and CAP_TRACING

v3->v4:
- rebase and typo fixes
- split selftests into separate patch
- update perf* docs with CAP_TRACING
- add a note to commit log that existing unpriv bpf behavior is not changing

v2->v3:
- dropped ftrace and kallsyms from CAP_TRACING description. In the future these mechanisms can start using it too.
- added CAP_SYS_ADMIN backward compatibility.

Alexei Starovoitov (4):
capability: introduce CAP_BPF and CAP_TRACING
bpf: implement CAP_BPF
perf: implement CAP_TRACING
selftests/bpf: use CAP_BPF and CAP_TRACING in tests

 Documentation/admin-guide/perf-security.rst |  4 +-
 Documentation/admin-guide/sysctl/kernel.rst | 10 ++---
 arch/powerpc/perf/core-book3s.c             |  4 +-
 arch/x86/events/intel/bts.c                 |  2 +-
 arch/x86/events/intel/core.c                |  2 +-
 arch/x86/events/intel/p4.c                  |  2 +-
 include/linux/capability.h                  | 18 ++++++++
 include/uapi/linux/capability.h             | 49 ++++++++++++++++++++-
 kernel/bpf/arraymap.c                       |  2 +-
 kernel/bpf/cgroup.c                         |  2 +-
 kernel/bpf/core.c                           |  4 +-
 kernel/bpf/hashtab.c                        |  4 +-
 kernel/bpf/lpm_trie.c                       |  2 +-
 kernel/bpf/queue_stack_maps.c               |  2 +-
 kernel/bpf/reuseport_array.c                |  2 +-
 kernel/bpf/stackmap.c                       |  2 +-
 kernel/bpf/syscall.c                        | 32 ++++++++------
 kernel/bpf/verifier.c                       |  2 +-
 kernel/events/core.c                        | 14 +++---
 kernel/events/hw_breakpoint.c               |  2 +-
 kernel/trace/bpf_trace.c                    |  2 +-
 kernel/trace/trace_event_perf.c             |  4 +-
 net/core/bpf_sk_storage.c                   |  2 +-
 net/core/filter.c                           | 10 +++--
 security/selinux/include/classmap.h         |  4 +-
 tools/testing/selftests/bpf/test_verifier.c | 46 +++++++++++++++----
 26 files changed, 165 insertions(+), 64 deletions(-)
Signature · 1 line
2.20.0