summaryrefslogtreecommitdiff
path: root/include/linux/lsm_hook_defs.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2024-08-06 15:38:12 -0700
committerAndrii Nakryiko <andrii@kernel.org>2024-09-12 18:57:54 -0700
commit433d7ce2d86d21274838c9e8c796f4232cd13cdb (patch)
tree0edfccd22377e193ed1897147e3ce531a5c18d1f /include/linux/lsm_hook_defs.h
parenteceb7b33e5f3bc1e60047d8695cb937b93a08ced (diff)
downloadlinux-433d7ce2d86d21274838c9e8c796f4232cd13cdb.tar.gz
linux-433d7ce2d86d21274838c9e8c796f4232cd13cdb.tar.bz2
linux-433d7ce2d86d21274838c9e8c796f4232cd13cdb.zip
security,bpf: constify struct path in bpf_token_create() LSM hook
There is no reason why struct path pointer shouldn't be const-qualified when being passed into bpf_token_create() LSM hook. Add that const. Acked-by: Paul Moore <paul@paul-moore.com> (LSM/SELinux) Suggested-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'include/linux/lsm_hook_defs.h')
-rw-r--r--include/linux/lsm_hook_defs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
index 855db460e08b..462b55378241 100644
--- a/include/linux/lsm_hook_defs.h
+++ b/include/linux/lsm_hook_defs.h
@@ -431,7 +431,7 @@ LSM_HOOK(int, 0, bpf_prog_load, struct bpf_prog *prog, union bpf_attr *attr,
struct bpf_token *token)
LSM_HOOK(void, LSM_RET_VOID, bpf_prog_free, struct bpf_prog *prog)
LSM_HOOK(int, 0, bpf_token_create, struct bpf_token *token, union bpf_attr *attr,
- struct path *path)
+ const struct path *path)
LSM_HOOK(void, LSM_RET_VOID, bpf_token_free, struct bpf_token *token)
LSM_HOOK(int, 0, bpf_token_cmd, const struct bpf_token *token, enum bpf_cmd cmd)
LSM_HOOK(int, 0, bpf_token_capable, const struct bpf_token *token, int cap)