Skip to content

Commit

Permalink
certs: make blacklisted hash available in klog
Browse files Browse the repository at this point in the history
One common situation triggering this log statement are duplicate hashes
reported by the system firmware.

These duplicates should be removed from the firmware.

Without logging the blacklisted hash triggering the issue however the users
can not report it properly to the firmware vendors and the firmware vendors
can not easily see which specific hash is duplicated.

While changing the log message also use the dedicated ERR_PTR format
placeholder for the returned error value.

Signed-off-by: Thomas Weißschuh <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
  • Loading branch information
t-8ch authored and jarkkojs committed Feb 13, 2023
1 parent 4d27328 commit 06b53b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion certs/blacklist.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int mark_raw_hash_blacklisted(const char *hash)
KEY_ALLOC_NOT_IN_QUOTA |
KEY_ALLOC_BUILT_IN);
if (IS_ERR(key)) {
pr_err("Problem blacklisting hash (%ld)\n", PTR_ERR(key));
pr_err("Problem blacklisting hash %s: %pe\n", hash, key);
return PTR_ERR(key);
}
return 0;
Expand Down

0 comments on commit 06b53b0

Please sign in to comment.