lsm: constify 'sb' parameter in security_sb_kern_mount()
authorKhadija Kamran <kamrankhadijadj@gmail.com>
Wed, 23 Aug 2023 09:01:28 +0000 (14:01 +0500)
committerPaul Moore <paul@paul-moore.com>
Thu, 14 Sep 2023 19:35:36 +0000 (15:35 -0400)
commit20a2aa47097aae7016209c4dbe392b3b25e0d883
tree4561b3f4cccc30cc03aa1ff16217b3f03b7f6f84
parenta721f7b8c3548e943e514a957f2a37f4763b9888
lsm: constify 'sb' parameter in security_sb_kern_mount()

The "sb_kern_mount" hook has implementation registered in SELinux.
Looking at the function implementation we observe that the "sb"
parameter is not changing.

Mark the "sb" parameter of LSM hook security_sb_kern_mount() as "const"
since it will not be changing in the LSM hook.

Signed-off-by: Khadija Kamran <kamrankhadijadj@gmail.com>
[PM: minor merge fuzzing due to other constification patches]
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/lsm_hook_defs.h
include/linux/security.h
security/security.c
security/selinux/hooks.c