diff mbox series

[2/2] bpf-lsm: Make bpf_lsm_create_user_ns() sleepable

Message ID 20220621233939.993579-3-fred@cloudflare.com (mailing list archive)
State Handled Elsewhere
Headers show
Series Introduce security_create_user_ns() | expand

Commit Message

Frederick Lawler June 21, 2022, 11:39 p.m. UTC
Users may want to audit calls to security_create_user_ns() and access
user space memory. Also create_user_ns() runs without
pagefault_disabled(). Therefore, make bpf_lsm_create_user_ns() sleepable
for mandatory access control policies.

Signed-off-by: Frederick Lawler <fred@cloudflare.com>
 kernel/bpf/bpf_lsm.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c
index c1351df9f7ee..75853965e7b0 100644
--- a/kernel/bpf/bpf_lsm.c
+++ b/kernel/bpf/bpf_lsm.c
@@ -250,6 +250,7 @@  BTF_ID(func, bpf_lsm_task_getsecid_obj)
 BTF_ID(func, bpf_lsm_task_prctl)
 BTF_ID(func, bpf_lsm_task_setscheduler)
 BTF_ID(func, bpf_lsm_task_to_inode)
+BTF_ID(func, bpf_lsm_create_user_ns)
 bool bpf_lsm_is_sleepable_hook(u32 btf_id)