[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220815162028.926858-3-fred@cloudflare.com>
Date: Mon, 15 Aug 2022 11:20:26 -0500
From: Frederick Lawler <fred@...udflare.com>
To: kpsingh@...nel.org, revest@...omium.org, jackmanb@...omium.org,
ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
kafai@...com, songliubraving@...com, yhs@...com,
john.fastabend@...il.com, jmorris@...ei.org, serge@...lyn.com,
paul@...l-moore.com, stephen.smalley.work@...il.com,
eparis@...isplace.org, shuah@...nel.org, brauner@...nel.org,
casey@...aufler-ca.com, ebiederm@...ssion.com, bpf@...r.kernel.org,
linux-security-module@...r.kernel.org, selinux@...r.kernel.org,
linux-kselftest@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
kernel-team@...udflare.com, cgzones@...glemail.com,
karl@...badwolfsecurity.com, tixxdz@...il.com,
Frederick Lawler <fred@...udflare.com>
Subject: [PATCH v5 2/4] 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@...nel.org>
Acked-by: Christian Brauner (Microsoft) <brauner@...nel.org>
Acked-by: KP Singh <kpsingh@...nel.org>
Signed-off-by: Frederick Lawler <fred@...udflare.com>
---
Changes since v4:
- None
Changes since v3:
- None
Changes since v2:
- Rename create_user_ns hook to userns_create
Changes since v1:
- None
---
kernel/bpf/bpf_lsm.c | 1 +
1 file changed, 1 insertion(+)
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)
--
2.30.2
Powered by blists - more mailing lists