Should we automatically generate a module signing key at all?

From: David Howells
Date: Mon May 18 2015 - 12:05:06 EST


Hi Michal, Dave,

Should we automatically generate a module signing key at all since that has
the possibility of accidentally overwriting a key that the builder has placed
in the tree?

Should we instead provide a script:

./scripts/generate-key

That generates a key if run and make it so that the build fails if you turn on
module signing and there's no key.

The script could then be parameterised, eg:

./scripts/generate-key -n dhowells@xxxxxxxxxx -k rsa2048 -d sha256 \
-o ./my-signing-key.priv -x ./my-signing-key.x509 \
-p "correct horse battery staple"

Yes, this might throw randconfig into a strop but that can be dealt with by:

(1) Requiring anyone who runs randconfig to provide a key first just in case.

(2) Marking the CONFIG_MODULE_SIG_ALL option to be ignored by randconfig - it
only applies during installation anyway.

(3) Accept that module *installation* will fail due to a lack of private key
and just handle a complete lack of X.509 certs in the source and build
dirs when assembling system_certificates.S.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/