Messages in this thread | | | From | "Valdis Klētnieks" <> | Subject | 'make O=' indigestion with module signing | Date | Thu, 11 Mar 2021 01:32:50 -0500 |
| |
So, I tried doing a 'make O=... allmodconfig', with a setup where the uid of the build process had write permission to the O= directory, but intentionally did *not* have write permission to the source tree (so they couldn't mess up the tree - I got tired of having to repeatedly do 'make mrproper' because of pilot error)
allmodconfig gave me a .config that had:
CONFIG_MODULE_SIG_FORMAT=y CONFIG_MODULE_SIG=y CONFIG_MODULE_SIG_FORCE=y CONFIG_MODULE_SIG_ALL=y CONFIG_MODULE_SIG_SHA1=y # CONFIG_MODULE_SIG_SHA224 is not set # CONFIG_MODULE_SIG_SHA256 is not set # CONFIG_MODULE_SIG_SHA384 is not set # CONFIG_MODULE_SIG_SHA512 is not set CONFIG_MODULE_SIG_HASH="sha1" CONFIG_IMA_APPRAISE_REQUIRE_MODULE_SIGS=y CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
What i *expected* was that multiple builds with different O= would each generate themselves a unique signing key and put it in their own O= directory and stay out of each other's way.
What actually happened:
EXTRACT_CERTS /usr/src/linux-next/"certs/signing_key.pem" At main.c:142: - SSL error:0200100D:system library:fopen:Permission denied: ../crypto/bio/bss_file.c:69 - SSL error:2006D002:BIO routines:BIO_new_file:system lib: ../crypto/bio/bss_file.c:78 extract-cert: /usr/src/linux-next/certs/signing_key.pem: Permission denied make[2]: *** [/usr/src/linux-next/certs/Makefile:106: certs/signing_key.x509] Error 1 make[1]: *** [/usr/src/linux-next/Makefile:1847: certs] Error 2 make[1]: Leaving directory '/usr/src/linux-next/out/arm64' make: *** [Makefile:215: __sub-make] Error 2
It tried to put the key into the source tree rather than the build tree.
Before I try to code up a fix for this, is this intentionally designed behavior, or have I just managed to trip over a rarely-tested corner case? [unhandled content-type:application/pgp-signature] | |