[lkml]   [2012]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] MODSIGN: Only sign modules if built in-tree
When building out-of-tree modules, the current modules_install target
will attempt to sign them if module signing is enabled. This will only
work if the signing keys are present in the build tree. That will
often not be the case for modules that are built out-of-tree against
distribution kernel development packages. This distros will not include
the signing keys, and build errors such as:

INSTALL /home/bruno/rpmbuild/BUILD/dahdi-linux-2.6.1/drivers/dahdi/dahdi_dyamic_eth.ko
Can't read private key
make[2]: *** [/home/bruno/rpmbuild/BUILD/dahdi-linux-2.6.1/drivers/dahdi/dahdi_dynamic.ko] Error 2

will prevent such modules from successfully being installed. This changes
the mod_sign_cmd to only sign the modules if they are built in-tree. Those
built externally can sign them manually.

Reported-by: Bruno Wolff III <>
Signed-off-by: Josh Boyer <>
Makefile | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/Makefile b/Makefile
index 42d0e56..3d10a87 100644
--- a/Makefile
+++ b/Makefile
@@ -720,6 +720,7 @@ export mod_strip_cmd

+ifeq ($(KBUILD_EXTMOD),)
MODSECKEY = ./signing_key.priv
MODPUBKEY = ./signing_key.x509
@@ -727,6 +728,9 @@ mod_sign_cmd = perl $(srctree)/scripts/sign-file $(MODSECKEY) $(MODPUBKEY)
mod_sign_cmd = true
+mod_sign_cmd = true
export mod_sign_cmd


 \ /
  Last update: 2012-10-31 15:01    [W:0.058 / U:9.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site