From patchwork Mon Feb 14 18:56:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 542861 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id AECF4C433EF for ; Mon, 14 Feb 2022 19:01:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229562AbiBNTB7 (ORCPT ); Mon, 14 Feb 2022 14:01:59 -0500 Received: from gmail-smtp-in.l.google.com ([23.128.96.19]:36260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbiBNTB2 (ORCPT ); Mon, 14 Feb 2022 14:01:28 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64B8FD227A; Mon, 14 Feb 2022 11:01:12 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2193E1F383; Mon, 14 Feb 2022 18:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1644865003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=f+iOC1OijgKnwOeDeGI5sZj1eeXHvVIuPR8OLLmfj1Y=; b=m7JcsLVnh6+9B+5w+vU+hjxLzDc88ZdY3A6A5r+0TmhioRAkB6QK1DKwKAmg8S5I/Ffx5Y nn9196foRWWRGpADWdJbFO2KTy76nsRsBRHRjiVz4hsa4MHkMDJsKYt08KT+Kfao/eHiv+ A9vUDkJ3kuXFQQ3umRpXycoRsAHLR/s= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1644865003; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=f+iOC1OijgKnwOeDeGI5sZj1eeXHvVIuPR8OLLmfj1Y=; b=0UzndL++7JY+Au/wZw9aK83EG62p/EFrmvKqFMHQpFZAg/Bj99Q5Pc96t2pY8yH3x9+SBG fXxVAPBTuyCxI7Aw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id D700813B55; Mon, 14 Feb 2022 18:56:42 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id JWxzMuqlCmKLSwAAMHmgww (envelope-from ); Mon, 14 Feb 2022 18:56:42 +0000 From: Petr Vorel To: linux-crypto@vger.kernel.org Cc: Petr Vorel , Nicolai Stange , Herbert Xu , Masahiro Yamada , linux-kbuild@vger.kernel.org Subject: [PATCH 1/1] crypto: vmx: Fix missing dependencies during boot Date: Mon, 14 Feb 2022 19:56:38 +0100 Message-Id: <20220214185638.1457-1-pvorel@suse.cz> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org if CRYPTO_DEV_VMX_ENCRYPT=y && !CRYPTO_MANAGER_DISABLE_TESTS and either of CRYPTO_AES, CRYPTO_CBC, CRYPTO_CTR or CRYPTO_XTS is built as module or disabled, alg_test() from crypto/testmgr.c complains during boot about failing to allocate the generic fallback implementations (2 == ENOENT): [ 0.540953] Failed to allocate xts(aes) fallback: -2 [ 0.541014] alg: skcipher: failed to allocate transform for p8_aes_xts: -2 [ 0.541120] alg: self-tests for p8_aes_xts (xts(aes)) failed (rc=-2) [ 0.544440] Failed to allocate ctr(aes) fallback: -2 [ 0.544497] alg: skcipher: failed to allocate transform for p8_aes_ctr: -2 [ 0.544603] alg: self-tests for p8_aes_ctr (ctr(aes)) failed (rc=-2) [ 0.547992] Failed to allocate cbc(aes) fallback: -2 [ 0.548052] alg: skcipher: failed to allocate transform for p8_aes_cbc: -2 [ 0.548156] alg: self-tests for p8_aes_cbc (cbc(aes)) failed (rc=-2) [ 0.550745] Failed to allocate transformation for 'aes': -2 [ 0.550801] alg: cipher: Failed to load transform for p8_aes: -2 [ 0.550892] alg: self-tests for p8_aes (aes) failed (rc=-2) Check for these dependencies if crypto tests enabled. NOTE: this requires all these dependencies to be builtin if !CRYPTO_MANAGER_DISABLE_TESTS, which is too strict on CRYPTO_DEV_VMX_ENCRYPT=m. Fixes: c07f5d3da643 ("crypto: vmx - Adding support for XTS") Fixes: d2e3ae6f3aba ("crypto: vmx - Enabling VMX module for PPC64") Link: https://bugzilla.suse.com/show_bug.cgi?id=1195768 Suggested-by: Nicolai Stange Signed-off-by: Petr Vorel --- Hi, what am I missing to allow e.g. CRYPTO_AES=m when CRYPTO_DEV_VMX_ENCRYPT=m? Kind regards, Petr drivers/crypto/vmx/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/crypto/vmx/Kconfig b/drivers/crypto/vmx/Kconfig index c85fab7ef0bd..d692802fad9e 100644 --- a/drivers/crypto/vmx/Kconfig +++ b/drivers/crypto/vmx/Kconfig @@ -2,6 +2,10 @@ config CRYPTO_DEV_VMX_ENCRYPT tristate "Encryption acceleration support on P8 CPU" depends on CRYPTO_DEV_VMX + depends on CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_AES || CRYPTO_AES=y + depends on CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_CBC || CRYPTO_CBC=y + depends on CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_CTR || CRYPTO_CTR=y + depends on CRYPTO_MANAGER_DISABLE_TESTS && CRYPTO_XTS || CRYPTO_XTS=y select CRYPTO_GHASH default m help