[PATCH v5 bpf-next 3/5] bpf: Allow kfuncs to be used in LSM programs
KP Singh
kpsingh at kernel.org
Tue Jun 28 16:19:46 UTC 2022
In preparation for the addition of bpf_getxattr kfunc.
Signed-off-by: KP Singh <kpsingh at kernel.org>
---
kernel/bpf/btf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/bpf/btf.c b/kernel/bpf/btf.c
index 9b9d6117deae..0331caa98726 100644
--- a/kernel/bpf/btf.c
+++ b/kernel/bpf/btf.c
@@ -7265,6 +7265,7 @@ static int bpf_prog_type_to_kfunc_hook(enum bpf_prog_type prog_type)
case BPF_PROG_TYPE_STRUCT_OPS:
return BTF_KFUNC_HOOK_STRUCT_OPS;
case BPF_PROG_TYPE_TRACING:
+ case BPF_PROG_TYPE_LSM:
return BTF_KFUNC_HOOK_TRACING;
case BPF_PROG_TYPE_SYSCALL:
return BTF_KFUNC_HOOK_SYSCALL;
--
2.37.0.rc0.161.g10f37bed90-goog
More information about the Linux-security-module-archive
mailing list