Skip to contentSkip to conversation

modsign: print module name along with error message

PATCH New Jessica Yu 1 participant 1 message Jan 15, 2020

lore
Share & tools
lore

Jessica Yu

author
#0 lore raw

PATCH 1/1 modsign: print module name along with error message

It is useful to know which module failed signature verification, so print the module name along with the error message.

---
This patch was sent last year, but apparently I forgot to pursue getting it merged (it had a dependency on the lockdown patchset). Now that's merged, I'm resending it.

[1] https://lore.kernel.org/lkml/[email protected]/

 kernel/module.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/module.c +1 -1
index d4d876172e9d..2b5f9c4748bc 100644
@@ -2882,7 +2882,7 @@ static int module_sig_check(struct load_info *info, int flags)
 		reason = "Loading of module with unavailable key";
 	decide:
 		if (is_module_sig_enforced()) {
-			pr_notice("%s is rejected\n", reason);
+			pr_notice("%s: %s is rejected\n", info->name, reason);
 			return -EKEYREJECTED;
 		}
 
Signature · 1 line
2.16.4