Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752659AbdDKMsh (ORCPT ); Tue, 11 Apr 2017 08:48:37 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:33991 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751861AbdDKMse (ORCPT ); Tue, 11 Apr 2017 08:48:34 -0400 From: Tobias Regnery To: dhowells@redhat.com, james.l.morris@oracle.com, serge@hallyn.com, linux-kernel@vger.kernel.org Cc: smueller@chronox.de, Tobias Regnery Subject: [PATCH] KEYS: fix build failure with CONFIG_KEY_DH_OPERATIONS Date: Tue, 11 Apr 2017 14:45:12 +0200 Message-Id: <20170411124512.23627-1-tobias.regnery@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1303 Lines: 33 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 --- 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