bpf,selinux: Allocate bpf_security_struct per BPF token
authorAndrii Nakryiko <andrii@kernel.org>
Wed, 24 Jan 2024 02:21:14 +0000 (18:21 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 25 Jan 2024 00:21:02 +0000 (16:21 -0800)
commit0054493e5141b16e316b8c52d6aa534397e48b6c
tree045ff7cf45922b3eeeca0ddfc2ee440666f9519f
parentfcb9597ff7d1f7c772c1237dd2d04dd44e622501
bpf,selinux: Allocate bpf_security_struct per BPF token

Utilize newly added bpf_token_create/bpf_token_free LSM hooks to
allocate struct bpf_security_struct for each BPF token object in
SELinux. This just follows similar pattern for BPF prog and map.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20240124022127.2379740-18-andrii@kernel.org
security/selinux/hooks.c