]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
bpf: lsm: Add two more sleepable hooks
authorSong Liu <song@kernel.org>
Thu, 30 Jan 2025 21:35:47 +0000 (13:35 -0800)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 14 Feb 2025 03:35:31 +0000 (19:35 -0800)
Add bpf_lsm_inode_removexattr and bpf_lsm_inode_post_removexattr to list
sleepable_lsm_hooks. These two hooks are always called from sleepable
context.

Signed-off-by: Song Liu <song@kernel.org>
Reviewed-by: Matt Bobrowski <mattbobrowski@google.com>
Link: https://lore.kernel.org/r/20250130213549.3353349-4-song@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
kernel/bpf/bpf_lsm.c

index 967492b65185fac5333fc22f4d2ad49cf59a6573..0a59df1c550a08193b9fcfc6675287ebaca9b69b 100644 (file)
@@ -316,7 +316,9 @@ BTF_ID(func, bpf_lsm_inode_getxattr)
 BTF_ID(func, bpf_lsm_inode_mknod)
 BTF_ID(func, bpf_lsm_inode_need_killpriv)
 BTF_ID(func, bpf_lsm_inode_post_setxattr)
+BTF_ID(func, bpf_lsm_inode_post_removexattr)
 BTF_ID(func, bpf_lsm_inode_readlink)
+BTF_ID(func, bpf_lsm_inode_removexattr)
 BTF_ID(func, bpf_lsm_inode_rename)
 BTF_ID(func, bpf_lsm_inode_rmdir)
 BTF_ID(func, bpf_lsm_inode_setattr)