[PATCH] lsm: constify 'sb' parameter in security_sb_kern_mount()

Paul Moore paul at paul-moore.com
Thu Sep 14 19:35:35 UTC 2023


On Aug 23, 2023 Khadija Kamran <kamrankhadijadj at gmail.com> wrote:
> 
> 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 at gmail.com>
> ---
>  include/linux/lsm_hook_defs.h | 2 +-
>  include/linux/security.h      | 2 +-
>  security/security.c           | 2 +-
>  security/selinux/hooks.c      | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)

Merged into lsm/next, thanks!

--
paul-moore.com



More information about the Linux-security-module-archive mailing list