Skip to content

Commit 281f2a2

Browse files
mrpregregkh
authored andcommitted
bpf: Drop task_to_inode and inet_conn_established from lsm sleepable hooks
[ Upstream commit beaf0e9 ] bpf_lsm_task_to_inode() is called under rcu_read_lock() and bpf_lsm_inet_conn_established() is called from softirq context, so neither hook can be used by sleepable LSM programs. Fixes: 423f161 ("bpf: Augment the set of sleepable LSM hooks") Reported-by: Quan Sun <2022090917019@std.uestc.edu.cn> Reported-by: Yinhao Hu <dddddd@hust.edu.cn> Reported-by: Kaiyan Mei <M202472210@hust.edu.cn> Reported-by: Dongliang Mu <dzm91@hust.edu.cn> Closes: https://lore.kernel.org/bpf/3ab69731-24d1-431a-a351-452aafaaf2a5@std.uestc.edu.cn/T/#u Signed-off-by: Jiayuan Chen <jiayuan.chen@linux.dev> Link: https://lore.kernel.org/r/20260407122334.344072-1-jiayuan.chen@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a9937a3 commit 281f2a2

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

kernel/bpf/bpf_lsm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,6 @@ BTF_ID(func, bpf_lsm_sb_umount)
357357
BTF_ID(func, bpf_lsm_settime)
358358

359359
#ifdef CONFIG_SECURITY_NETWORK
360-
BTF_ID(func, bpf_lsm_inet_conn_established)
361-
362360
BTF_ID(func, bpf_lsm_socket_accept)
363361
BTF_ID(func, bpf_lsm_socket_bind)
364362
BTF_ID(func, bpf_lsm_socket_connect)
@@ -379,7 +377,6 @@ BTF_ID(func, bpf_lsm_syslog)
379377
BTF_ID(func, bpf_lsm_task_alloc)
380378
BTF_ID(func, bpf_lsm_task_prctl)
381379
BTF_ID(func, bpf_lsm_task_setscheduler)
382-
BTF_ID(func, bpf_lsm_task_to_inode)
383380
BTF_ID(func, bpf_lsm_userns_create)
384381
BTF_SET_END(sleepable_lsm_hooks)
385382

0 commit comments

Comments
 (0)