Skip to content
Commit 22e46f64 authored by Jan Luebbe's avatar Jan Luebbe Committed by Masahiro Yamada
Browse files

kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI



When CONFIG_MODULE_SIG_KEY is PKCS#11 URI (pkcs11:*), signing of modules
fails:

  scripts/sign-file sha256 /.../linux/pkcs11:token=foo;object=bar;pin-value=1111 certs/signing_key.x509 /.../kernel/crypto/tcrypt.ko
  Usage: scripts/sign-file [-dp] <hash algo> <key> <x509> <module> [<dest>]
         scripts/sign-file -s <raw sig> <hash algo> <x509> <module> [<dest>]

First, we need to avoid adding the $(srctree)/ prefix to the URL.

Second, since the kconfig string values no longer include quotes, we need to add
them again when passing a PKCS#11 URI to sign-file. This avoids
splitting by the shell if the URI contains semicolons.

Fixes: 4db9c2e3 ("kbuild: stop using config_filename in scripts/Makefile.modsign")
Fixes: 129ab0d2 ("kbuild: do not quote string values in include/config/auto.conf")
Signed-off-by: default avatarJan Luebbe <jlu@pengutronix.de>
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent b1c3d2be
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment