[PATCH v16 15/20] security: add security_inode_setintegrity() hook
Paul Moore
paul at paul-moore.com
Tue Apr 2 01:26:45 UTC 2024
On Mar 28, 2024 Fan Wu <wufan at linux.microsoft.com> wrote:
>
> This patch introduces a new hook to save inode's integrity
> data. For example, for fsverity enabled files, LSMs can use this hook to
> save the verified fsverity builtin signature into the inode's security
> blob, and LSMs can make access decisions based on the data inside
> the signature, like the signer certificate.
>
> Signed-off-by: Fan Wu <wufan at linux.microsoft.com>
>
> --
> v1-v14:
> + Not present
>
> v15:
> + Introduced
>
> v16:
> + Switch to call_int_hook()
>
> ---
> include/linux/lsm_hook_defs.h | 2 ++
> include/linux/security.h | 10 ++++++++++
> security/security.c | 20 ++++++++++++++++++++
> 3 files changed, 32 insertions(+)
>
> diff --git a/include/linux/lsm_hook_defs.h b/include/linux/lsm_hook_defs.h
> index b391a7f13053..6f746dfdb28b 100644
> --- a/include/linux/lsm_hook_defs.h
> +++ b/include/linux/lsm_hook_defs.h
> @@ -1020,6 +1023,13 @@ static inline int security_inode_copy_up(struct dentry *src, struct cred **new)
> return 0;
> }
>
> +static inline int security_inode_setintegrity(struct inode *inode,
> + enum lsm_integrity_type, type,
Another bonus comma ...
> + const void *value, size_t size)
> +{
> + return 0;
> +}
> +
--
paul-moore.com
More information about the Linux-security-module-archive
mailing list