bpf,selinux: allocate bpf_security_struct per BPF token
authorAndrii Nakryiko <andrii@kernel.org>
Thu, 30 Nov 2023 18:52:29 +0000 (10:52 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Wed, 6 Dec 2023 18:03:00 +0000 (10:03 -0800)
commit36fb94944b35062db15ab3059f4123048cac658c
treeb25a269f54206b8652cf64b002d7d589d505a8c1
parentdc5196fac40c2cb96330bcb98eef868a7fd225b3
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>
Link: https://lore.kernel.org/r/20231130185229.2688956-18-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
security/selinux/hooks.c