Jan Luebbe 65166bccd0 kbuild: modinst: Fix build error when CONFIG_MODULE_SIG_KEY is a PKCS#11 URI
[ Upstream commit 22e46f6480e83bcf49b6d5e6b66c81872c97a902 ]

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: 4db9c2e3d055 ("kbuild: stop using config_filename in scripts/Makefile.modsign")
Fixes: 129ab0d2d9f3 ("kbuild: do not quote string values in include/config/auto.conf")
Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-02-09 11:28:11 +01:00
..
2022-08-07 21:30:36 +02:00
2022-09-28 09:02:20 +02:00
2022-10-10 12:00:45 -07:00
2022-10-10 12:00:45 -07:00
2022-09-28 09:02:20 +02:00
2022-09-28 09:02:20 +02:00
2022-03-21 08:13:03 -07:00
2022-09-28 09:02:20 +02:00
2022-10-10 12:00:45 -07:00
2022-09-28 09:02:20 +02:00
2022-10-03 14:03:19 -07:00
2022-10-10 12:00:45 -07:00
2022-10-28 00:19:40 +09:00
2022-09-26 10:13:13 -07:00
2022-03-07 13:54:59 +01:00
2020-12-08 23:30:04 +09:00
2020-12-08 23:30:04 +09:00
2021-05-03 17:23:06 -06:00