Skip to content

Commit db27c22

Browse files
committed
Merge tag 'kbuild-fixes-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
Pull Kbuild fixes from Masahiro Yamada: - Fix two bugs (for building and for signing) when MODULE_SIG_KEY contains a PKCS#11 URI * tag 'kbuild-fixes-v6.2-4' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI certs: Fix build error when PKCS#11 URI contains semicolon
2 parents c00f4dd + 22e46f6 commit db27c22

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

certs/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ $(obj)/blacklist_hash_list: $(CONFIG_SYSTEM_BLACKLIST_HASH_LIST) FORCE
2323
targets += blacklist_hash_list
2424

2525
quiet_cmd_extract_certs = CERT $@
26-
cmd_extract_certs = $(obj)/extract-cert $(extract-cert-in) $@
27-
extract-cert-in = $(or $(filter-out $(obj)/extract-cert, $(real-prereqs)),"")
26+
cmd_extract_certs = $(obj)/extract-cert "$(extract-cert-in)" $@
27+
extract-cert-in = $(filter-out $(obj)/extract-cert, $(real-prereqs))
2828

2929
$(obj)/system_certificates.o: $(obj)/x509_certificate_list
3030

scripts/Makefile.modinst

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ endif
6666
# Don't stop modules_install even if we can't sign external modules.
6767
#
6868
ifeq ($(CONFIG_MODULE_SIG_ALL),y)
69+
ifeq ($(filter pkcs11:%, $(CONFIG_MODULE_SIG_KEY)),)
6970
sig-key := $(if $(wildcard $(CONFIG_MODULE_SIG_KEY)),,$(srctree)/)$(CONFIG_MODULE_SIG_KEY)
71+
else
72+
sig-key := $(CONFIG_MODULE_SIG_KEY)
73+
endif
7074
quiet_cmd_sign = SIGN $@
71-
cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(sig-key) certs/signing_key.x509 $@ \
75+
cmd_sign = scripts/sign-file $(CONFIG_MODULE_SIG_HASH) "$(sig-key)" certs/signing_key.x509 $@ \
7276
$(if $(KBUILD_EXTMOD),|| true)
7377
else
7478
quiet_cmd_sign :=

0 commit comments

Comments
 (0)