Skip to content

Commit

Permalink
ima: Fix build warnings
Browse files Browse the repository at this point in the history
[ Upstream commit 95526d1 ]

Fix build warnings (function parameters description) for
ima_collect_modsig(), ima_match_policy() and ima_parse_add_rule().

Fixes: 1558822 ("ima: Collect modsig") # v5.4+
Fixes: 2fe5d6d ("ima: integrity appraisal extension") # v5.14+
Fixes: 4af4662 ("integrity: IMA policy") # v3.2+
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
robertosassu authored and gregkh committed Jul 19, 2023
1 parent 9085f2c commit 2672144
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions security/integrity/ima/ima_modsig.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@ int ima_read_modsig(enum ima_hooks func, const void *buf, loff_t buf_len,

/**
* ima_collect_modsig - Calculate the file hash without the appended signature.
* @modsig: parsed module signature
* @buf: data to verify the signature on
* @size: data size
*
* Since the modsig is part of the file contents, the hash used in its signature
* isn't the same one ordinarily calculated by IMA. Therefore PKCS7 code
Expand Down
3 changes: 2 additions & 1 deletion security/integrity/ima/ima_policy.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ static int get_subaction(struct ima_rule_entry *rule, enum ima_hooks func)
* @secid: LSM secid of the task to be validated
* @func: IMA hook identifier
* @mask: requested action (MAY_READ | MAY_WRITE | MAY_APPEND | MAY_EXEC)
* @flags: IMA actions to consider (e.g. IMA_MEASURE | IMA_APPRAISE)
* @pcr: set the pcr to extend
* @template_desc: the template that should be used for this rule
* @func_data: func specific data, may be NULL
Expand Down Expand Up @@ -1885,7 +1886,7 @@ static int ima_parse_rule(char *rule, struct ima_rule_entry *entry)

/**
* ima_parse_add_rule - add a rule to ima_policy_rules
* @rule - ima measurement policy rule
* @rule: ima measurement policy rule
*
* Avoid locking by allowing just one writer at a time in ima_write_policy()
* Returns the length of the rule parsed, an error code on failure
Expand Down

0 comments on commit 2672144

Please sign in to comment.