From: Thomas Weißschuh Date: Mon, 9 Jan 2023 23:59:41 +0000 (+0000) Subject: certs: make blacklisted hash available in klog X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=06b53b02945e3021addc6af2da3ac999d2221d23;p=linux.git certs: make blacklisted hash available in klog 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 Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- diff --git a/certs/blacklist.c b/certs/blacklist.c index 41f10601cc724..6e260c4b6a193 100644 --- a/certs/blacklist.c +++ b/certs/blacklist.c @@ -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;