Commit 401e64b3 authored by Frederick Lawler's avatar Frederick Lawler Committed by Paul Moore

bpf-lsm: Make bpf_lsm_userns_create() sleepable

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_userns_create() sleepable
for mandatory access control policies.
Acked-by: default avatarAlexei Starovoitov <ast@kernel.org>
Acked-by: default avatarChristian Brauner (Microsoft) <brauner@kernel.org>
Acked-by: default avatarKP Singh <kpsingh@kernel.org>
Signed-off-by: default avatarFrederick Lawler <fred@cloudflare.com>
Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
parent 7cd4c5c2
...@@ -335,6 +335,7 @@ BTF_ID(func, bpf_lsm_task_getsecid_obj) ...@@ -335,6 +335,7 @@ BTF_ID(func, bpf_lsm_task_getsecid_obj)
BTF_ID(func, bpf_lsm_task_prctl) BTF_ID(func, bpf_lsm_task_prctl)
BTF_ID(func, bpf_lsm_task_setscheduler) BTF_ID(func, bpf_lsm_task_setscheduler)
BTF_ID(func, bpf_lsm_task_to_inode) BTF_ID(func, bpf_lsm_task_to_inode)
BTF_ID(func, bpf_lsm_userns_create)
BTF_SET_END(sleepable_lsm_hooks) BTF_SET_END(sleepable_lsm_hooks)
bool bpf_lsm_is_sleepable_hook(u32 btf_id) bool bpf_lsm_is_sleepable_hook(u32 btf_id)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment