All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KEYS: fix build failure with CONFIG_KEY_DH_OPERATIONS
@ 2017-04-11 12:45 Tobias Regnery
  2017-04-11 13:47 ` Stephan Müller
  0 siblings, 1 reply; 2+ messages in thread
From: Tobias Regnery @ 2017-04-11 12:45 UTC (permalink / raw)
  To: dhowells, james.l.morris, serge, linux-kernel; +Cc: smueller, Tobias Regnery

With CONFIG_KEY_DH_OPERATIONS=y and CONFIG_CRYPTO=m we get the following
link error:

security/built-in.o: In function `__keyctl_dh_compute':
device_cgroup.c:(.text+0x925c): undefined reference to 'crypto_alloc_shash'
device_cgroup.c:(.text+0x9510): undefined reference to 'crypto_shash_update'
device_cgroup.c:(.text+0x9548): undefined reference to 'crypto_shash_update'
device_cgroup.c:(.text+0x957c): undefined reference to 'crypto_shash_final'
device_cgroup.c:(.text+0x95d0): undefined reference to 'crypto_shash_final'
device_cgroup.c:(.text+0x9710): undefined reference to 'crypto_destroy_tfm'

Fix this by selecting the crypto core in order to reach the functions above.

Fixes: f1c316a3ab9d ("KEYS: add SP800-56A KDF support for DH")
Signed-off-by: Tobias Regnery <tobias.regnery@gmail.com>
---
 security/keys/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/security/keys/Kconfig b/security/keys/Kconfig
index 4ac1b83a23f8..6fd95f76bfae 100644
--- a/security/keys/Kconfig
+++ b/security/keys/Kconfig
@@ -90,6 +90,7 @@ config KEY_DH_OPERATIONS
        bool "Diffie-Hellman operations on retained keys"
        depends on KEYS
        select MPILIB
+       select CRYPTO
        select CRYPTO_HASH
        help
 	 This option provides support for calculating Diffie-Hellman
-- 
2.11.0

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

* Re: [PATCH] KEYS: fix build failure with CONFIG_KEY_DH_OPERATIONS
  2017-04-11 12:45 [PATCH] KEYS: fix build failure with CONFIG_KEY_DH_OPERATIONS Tobias Regnery
@ 2017-04-11 13:47 ` Stephan Müller
  0 siblings, 0 replies; 2+ messages in thread
From: Stephan Müller @ 2017-04-11 13:47 UTC (permalink / raw)
  To: Tobias Regnery; +Cc: dhowells, james.l.morris, serge, linux-kernel

Am Dienstag, 11. April 2017, 14:45:12 CEST schrieb Tobias Regnery:

Hi Tobias,

> With CONFIG_KEY_DH_OPERATIONS=y and CONFIG_CRYPTO=m we get the following
> link error:

Thanks for the patch. I just released the very same patch :-)

David, I guess it makes more sense now to simply apply that patch instead of 
me going back and update the original patch.

Thanks.

Ciao
Stephan

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

end of thread, other threads:[~2017-04-11 13:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 12:45 [PATCH] KEYS: fix build failure with CONFIG_KEY_DH_OPERATIONS Tobias Regnery
2017-04-11 13:47 ` Stephan Müller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.