Skip to content

Commit

Permalink
ima: Remove __init annotation from ima_pcrread()
Browse files Browse the repository at this point in the history
Commit 6cc7c26 ("ima: Call ima_calc_boot_aggregate() in
ima_eventdigest_init()") added a call to ima_calc_boot_aggregate() so that
the digest can be recalculated for the boot_aggregate measurement entry if
the 'd' template field has been requested. For the 'd' field, only SHA1 and
MD5 digests are accepted.

Given that ima_eventdigest_init() does not have the __init annotation, all
functions called should not have it. This patch removes __init from
ima_pcrread().

Cc: [email protected]
Fixes:  6cc7c26 ("ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init()")
Reported-by: Linus Torvalds <[email protected]>
Signed-off-by: Roberto Sassu <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
robertosassu authored and torvalds committed Jun 7, 2020
1 parent 9aa900c commit 8b8c704
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion security/integrity/ima/ima_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,7 @@ int ima_calc_buffer_hash(const void *buf, loff_t len,
return calc_buffer_shash(buf, len, hash);
}

static void __init ima_pcrread(u32 idx, struct tpm_digest *d)
static void ima_pcrread(u32 idx, struct tpm_digest *d)
{
if (!ima_tpm_chip)
return;
Expand Down

0 comments on commit 8b8c704

Please sign in to comment.