diff options
author | Frederick Lawler <fred@cloudflare.com> | 2022-08-15 11:20:26 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2022-08-16 17:38:21 -0400 |
commit | 401e64b3a4af4c7a2f6a00337232a3cf0bb757ed (patch) | |
tree | 153bef5b9c5ccaecc5c1ebad6bd17cbe2bb85324 | |
parent | 7cd4c5c2101cb092db00f61f69d24380cf7a0ee8 (diff) | |
download | lwn-401e64b3a4af4c7a2f6a00337232a3cf0bb757ed.tar.gz lwn-401e64b3a4af4c7a2f6a00337232a3cf0bb757ed.zip |
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: Alexei Starovoitov <ast@kernel.org>
Acked-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Acked-by: KP Singh <kpsingh@kernel.org>
Signed-off-by: Frederick Lawler <fred@cloudflare.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r-- | kernel/bpf/bpf_lsm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/bpf/bpf_lsm.c b/kernel/bpf/bpf_lsm.c index fa71d58b7ded..761998fda762 100644 --- a/kernel/bpf/bpf_lsm.c +++ b/kernel/bpf/bpf_lsm.c @@ -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_setscheduler) BTF_ID(func, bpf_lsm_task_to_inode) +BTF_ID(func, bpf_lsm_userns_create) BTF_SET_END(sleepable_lsm_hooks) bool bpf_lsm_is_sleepable_hook(u32 btf_id) |