Commit bae60eef authored by Roberto Sassu's avatar Roberto Sassu Committed by Alexei Starovoitov

ima: Fix documentation-related warnings in ima_main.c

Fix the following warnings in ima_main.c, displayed with W=n make argument:

security/integrity/ima/ima_main.c:432: warning: Function parameter or
                          member 'vma' not described in 'ima_file_mprotect'
security/integrity/ima/ima_main.c:636: warning: Function parameter or
                  member 'inode' not described in 'ima_post_create_tmpfile'
security/integrity/ima/ima_main.c:636: warning: Excess function parameter
                            'file' description in 'ima_post_create_tmpfile'
security/integrity/ima/ima_main.c:843: warning: Function parameter or
                     member 'load_id' not described in 'ima_post_load_data'
security/integrity/ima/ima_main.c:843: warning: Excess function parameter
                                   'id' description in 'ima_post_load_data'

Also, fix some style issues in the description of ima_post_create_tmpfile()
and ima_post_path_mknod().
Signed-off-by: default avatarRoberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Reviewed-by: default avatarMimi Zohar <zohar@linux.ibm.com>
Link: https://lore.kernel.org/bpf/20220302111404.193900-2-roberto.sassu@huawei.com
parent 357b3cc3
...@@ -418,6 +418,7 @@ int ima_file_mmap(struct file *file, unsigned long prot) ...@@ -418,6 +418,7 @@ int ima_file_mmap(struct file *file, unsigned long prot)
/** /**
* ima_file_mprotect - based on policy, limit mprotect change * ima_file_mprotect - based on policy, limit mprotect change
* @vma: vm_area_struct protection is set to
* @prot: contains the protection that will be applied by the kernel. * @prot: contains the protection that will be applied by the kernel.
* *
* Files can be mmap'ed read/write and later changed to execute to circumvent * Files can be mmap'ed read/write and later changed to execute to circumvent
...@@ -611,7 +612,7 @@ EXPORT_SYMBOL_GPL(ima_inode_hash); ...@@ -611,7 +612,7 @@ EXPORT_SYMBOL_GPL(ima_inode_hash);
/** /**
* ima_post_create_tmpfile - mark newly created tmpfile as new * ima_post_create_tmpfile - mark newly created tmpfile as new
* @mnt_userns: user namespace of the mount the inode was found from * @mnt_userns: user namespace of the mount the inode was found from
* @file : newly created tmpfile * @inode: inode of the newly created tmpfile
* *
* No measuring, appraising or auditing of newly created tmpfiles is needed. * No measuring, appraising or auditing of newly created tmpfiles is needed.
* Skip calling process_measurement(), but indicate which newly, created * Skip calling process_measurement(), but indicate which newly, created
...@@ -814,8 +815,8 @@ int ima_load_data(enum kernel_load_data_id id, bool contents) ...@@ -814,8 +815,8 @@ int ima_load_data(enum kernel_load_data_id id, bool contents)
* ima_post_load_data - appraise decision based on policy * ima_post_load_data - appraise decision based on policy
* @buf: pointer to in memory file contents * @buf: pointer to in memory file contents
* @size: size of in memory file contents * @size: size of in memory file contents
* @id: kernel load data caller identifier * @load_id: kernel load data caller identifier
* @description: @id-specific description of contents * @description: @load_id-specific description of contents
* *
* Measure/appraise/audit in memory buffer based on policy. Policy rules * Measure/appraise/audit in memory buffer based on policy. Policy rules
* are written in terms of a policy identifier. * are written in terms of a policy identifier.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment