RFC bpf: Add a new kfunc bpf_current_capable
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest2 patches 13 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: Add bpf_current_capable kfunckernel/ | +6 | 26 replies | |
| 2/2 | selftests/bpf: Add selftest for bpf_current_capabletools/ tools/ | +117 | 0 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Hagar Gamal Halim Hemdan | Yafang Shao |
|---|---|---|
| 1/2 | A-b | Based-on-patch-by |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH bpf-next 0/2] bpf: Add a new kfunc bpf_current_capable
Add a new kfunc bpf_current_capable to check whether the current task has a specific capability. In our use case, we will use it in a lsm bpf program to verify if the user operation is permitted based on our security policy.
Yafang Shao (2):
bpf: Add bpf_current_capable kfunc selftests/bpf: Add selftest for bpf_current_capable
kernel/bpf/helpers.c | 6 ++ .../selftests/bpf/prog_tests/bpf_current_cap.c | 80 ++++++++++++++++++++++ .../selftests/bpf/progs/test_bpf_current_cap.c | 37 ++++++++++ 3 files changed, 123 insertions(+) create mode 100644 tools/testing/selftests/bpf/prog_tests/bpf_current_cap.c create mode 100644 tools/testing/selftests/bpf/progs/test_bpf_current_cap.c
Signature · 1 line
1.8.3.1