Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bpf: Drop task_to_inode and inet_conn_established from lsm sleepable hooks

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: 423f16108c9d8 ("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>

authored by

Jiayuan Chen and committed by
Alexei Starovoitov
beaf0e96 8b648a51

-3
-3
kernel/bpf/bpf_lsm.c
··· 359 359 BTF_ID(func, bpf_lsm_settime) 360 360 361 361 #ifdef CONFIG_SECURITY_NETWORK 362 - BTF_ID(func, bpf_lsm_inet_conn_established) 363 - 364 362 BTF_ID(func, bpf_lsm_socket_accept) 365 363 BTF_ID(func, bpf_lsm_socket_bind) 366 364 BTF_ID(func, bpf_lsm_socket_connect) ··· 379 381 BTF_ID(func, bpf_lsm_task_alloc) 380 382 BTF_ID(func, bpf_lsm_task_prctl) 381 383 BTF_ID(func, bpf_lsm_task_setscheduler) 382 - BTF_ID(func, bpf_lsm_task_to_inode) 383 384 BTF_ID(func, bpf_lsm_userns_create) 384 385 BTF_ID(func, bpf_lsm_bdev_alloc_security) 385 386 BTF_ID(func, bpf_lsm_bdev_setintegrity)