diff options
author | 2023-11-30 10:52:23 -0800 | |
---|---|---|
committer | 2023-12-06 10:03:00 -0800 | |
commit | d734ca7b33dbf60eb15dcf7c44f3da7073356777 (patch) | |
tree | 094194f17a60f5e22567a26ba3ae537556a54456 /tools | |
parent | bpf,lsm: refactor bpf_map_alloc/bpf_map_free LSM hooks (diff) | |
download | wireguard-linux-d734ca7b33dbf60eb15dcf7c44f3da7073356777.tar.xz wireguard-linux-d734ca7b33dbf60eb15dcf7c44f3da7073356777.zip |
bpf,lsm: add BPF token LSM hooks
Wire up bpf_token_create and bpf_token_free LSM hooks, which allow to
allocate LSM security blob (we add `void *security` field to struct
bpf_token for that), but also control who can instantiate BPF token.
This follows existing pattern for BPF map and BPF prog.
Also add security_bpf_token_allow_cmd() and security_bpf_token_capable()
LSM hooks that allow LSM implementation to control and negate (if
necessary) BPF token's delegation of a specific bpf_cmd and capability,
respectively.
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20231130185229.2688956-12-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions