aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Gardner <tim.gardner@canonical.com>2012-11-05 10:06:33 -0700
committerJohn Rigby <john.rigby@linaro.org>2012-11-14 18:19:45 -0700
commit1e60a51312b0b4e44d4318ce0108431aaad07866 (patch)
tree91906e350e5c1f9b8b20006b8f5b1b5f7e17ef3f
parent7d9ff59b7d96b75708620a297032beaceb487c1b (diff)
UBUNTU: SAUCE: MODSIGN: Emit error for incorrectly signed module
Emit an error when module.sig_enforce==true and a module is incorrectly signed. It is not always obvious why a module failed to load. This makes it explicit if it is a signing error. Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-rw-r--r--kernel/module.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/module.c b/kernel/module.c
index 6e48c3a4359..2e17852a259 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -2451,6 +2451,9 @@ static int module_sig_check(struct load_info *info,
if (err == -ENOKEY && !sig_enforce)
err = 0;
+ if (err < 0)
+ pr_err("module: error loading incorrectly signed module.\n");
+
return err;
}
#else /* !CONFIG_MODULE_SIG */