public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] certs: make system keyring depend on built-in x509 parser
@ 2022-09-12  6:52 Masahiro Yamada
  2022-09-12  7:27 ` Adam Borowski
  0 siblings, 1 reply; 2+ messages in thread
From: Masahiro Yamada @ 2022-09-12  6:52 UTC (permalink / raw)
  To: David Howells, David Woodhouse, keyrings, Linus Torvalds
  Cc: linux-kernel, Arnd Bergmann, Adam Borowski, linux-kbuild,
	Masahiro Yamada

Commit e90886291c7c ("certs: make system keyring depend on x509 parser")
is not the right fix because x509_load_certificate_list() can be modular.

The combination of CONFIG_SYSTEM_TRUSTED_KEYRING=y and
CONFIG_X509_CERTIFICATE_PARSER=m still results in the following error:

    LD      .tmp_vmlinux.kallsyms1
  ld: certs/system_keyring.o: in function `load_system_certificate_list':
  system_keyring.c:(.init.text+0x8c): undefined reference to `x509_load_certificate_list'
  make: *** [Makefile:1169: vmlinux] Error 1

Fixes: e90886291c7c ("certs: make system keyring depend on x509 parser")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 certs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/certs/Kconfig b/certs/Kconfig
index bf9b511573d7..1f109b070877 100644
--- a/certs/Kconfig
+++ b/certs/Kconfig
@@ -43,7 +43,7 @@ config SYSTEM_TRUSTED_KEYRING
 	bool "Provide system-wide ring of trusted keys"
 	depends on KEYS
 	depends on ASYMMETRIC_KEY_TYPE
-	depends on X509_CERTIFICATE_PARSER
+	depends on X509_CERTIFICATE_PARSER = y
 	help
 	  Provide a system keyring to which trusted keys can be added.  Keys in
 	  the keyring are considered to be trusted.  Keys may be added at will
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] certs: make system keyring depend on built-in x509 parser
  2022-09-12  6:52 [PATCH] certs: make system keyring depend on built-in x509 parser Masahiro Yamada
@ 2022-09-12  7:27 ` Adam Borowski
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Borowski @ 2022-09-12  7:27 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Howells, David Woodhouse, keyrings, Linus Torvalds,
	linux-kernel, Arnd Bergmann, linux-kbuild

On Mon, Sep 12, 2022 at 03:52:10PM +0900, Masahiro Yamada wrote:
> Commit e90886291c7c ("certs: make system keyring depend on x509 parser")
> is not the right fix because x509_load_certificate_list() can be modular.

... oif.

> --- a/certs/Kconfig
> +++ b/certs/Kconfig
> @@ -43,7 +43,7 @@ config SYSTEM_TRUSTED_KEYRING
> -	depends on X509_CERTIFICATE_PARSER
> +	depends on X509_CERTIFICATE_PARSER = y

This works.


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ A white dwarf seeks a red giant for a binary relationship.
⢿⡄⠘⠷⠚⠋⠀
⠈⠳⣄⠀⠀⠀⠀

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-12  7:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-12  6:52 [PATCH] certs: make system keyring depend on built-in x509 parser Masahiro Yamada
2022-09-12  7:27 ` Adam Borowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox