modsign: print module name along with error message
authorJessica Yu <jeyu@kernel.org>
Wed, 15 Jan 2020 14:49:31 +0000 (15:49 +0100)
committerJessica Yu <jeyu@kernel.org>
Wed, 15 Jan 2020 14:49:31 +0000 (15:49 +0100)
It is useful to know which module failed signature verification, so
print the module name along with the error message.

Signed-off-by: Jessica Yu <jeyu@kernel.org>
kernel/module.c

index d4d876172e9d15a7b001d819f6507caedb06c92d..2b5f9c4748bc90e7efa56dc460ba331039a034d5 100644 (file)
@@ -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;
                }