Received: by 2002:a05:6358:bb9e:b0:b9:5105:a5b4 with SMTP id df30csp5388450rwb; Wed, 7 Sep 2022 01:56:12 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Oo3PzV+G5vGX9UAQaaLvWnmj1B1L4v+0OcnU0MWuqwcKd+N2oCcWaOCOU9s3iK7oFL0wi X-Received: by 2002:a63:36cb:0:b0:430:c35:b2ee with SMTP id d194-20020a6336cb000000b004300c35b2eemr2520994pga.437.1662540972460; Wed, 07 Sep 2022 01:56:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662540972; cv=none; d=google.com; s=arc-20160816; b=gQqX4cN68/rcUW4UfAbvoNYm0LX/Ve4bwLP/27Xjc4wF+PFKwQmGkR1bSqYrYuiopi fgYH2pBqPGEGKJpWsRGnsZzyVvDl437P7j8pVBg70Jmvos2afRr+Llg6oTgqjnAW1DsY y3vXL2ecI/HwVMiTjCWBMS1UbChdk24gDXkgIU/KfsBAI7enhYUfMDvjN2ZWRuLfXTE8 5k2HWIVBEDtiJC7QhB5ho2d+jmQowLZn+3dPTOpRZAUDDjxIw79lkdBoJG3X1+nPI60Q q0aNCdpk957+xVjHcJhvE7ef3Sm6OYtEL6/OiWgfZeX28NXkFc8GbgQ+qla+xeS9je3M hJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:message-id:cc:to:subject:from:references :in-reply-to:content-transfer-encoding:mime-version:dkim-signature; bh=DSSlvyJIYaiZo3JTisnVqvW/vHgnYFMuYvuJZHk/g/M=; b=GTh5Djv/yEyK7ez/fNU1EiFmQfEErSbDXrf6ih7PRvtO68nGgu2At6Neojo8FYVvxN nDPixXqF1OAOZkOhbWmRjPxLPDiJMLbhG/nXIoAcoaG7OvD8FkrH8GVMl2cF81vWFkVj E0Ed8nLVC3vLWbCHfJr9GaORXpg78ukCNHKjkAjE7nQJ8jk8Aqf2y+X+21CqXzS4eiFZ u0fwtAOF1nIJhtkl+4FBCPg0uba8JpwjCN7KcI5ebYx/cjVNuBN8/c71A00QzcoyxT1E cZAKM+0x0s1MQYPKkZiEDsKj3godDpTXbNB4aNM02fabs44QfKhNK6GqrL8C07MefB40 qsXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gPvkPgz4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mq14-20020a17090b380e00b00200aa62790dsi3294268pjb.94.2022.09.07.01.55.53; Wed, 07 Sep 2022 01:56:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gPvkPgz4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229697AbiIGIsf (ORCPT + 99 others); Wed, 7 Sep 2022 04:48:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56880 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229910AbiIGIsc (ORCPT ); Wed, 7 Sep 2022 04:48:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B70FCA7AA2 for ; Wed, 7 Sep 2022 01:48:24 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E3A62B81ADB for ; Wed, 7 Sep 2022 08:48:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A3BDC433C1; Wed, 7 Sep 2022 08:48:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662540501; bh=DSSlvyJIYaiZo3JTisnVqvW/vHgnYFMuYvuJZHk/g/M=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=gPvkPgz4c19RDsKuXnB3QgYzLDkfJmbwYqK/H3xakVqFP7j6ALR9Sw0Uz7Urf+grJ VynDcvKAXAmpkS/i22LXfMxXxylNc6YtpZ472iKMjLKGRvTqQLKmPJJYnGwEg9VVsc vd/rBft16Hz1oQjkmJr7E9oUBC58H8jITE8K9I9/XHj0QArFI1o6rQWk6m87RyLepO c5kKWnnhG+l7vxm8jvlvF9y9VaEu9Ku8rjhEmSJ6jENgRLmPoZc2bhHtnsSTlYhGm7 dNU4ErhescFqBZ8oFDRLcQ9+Svk74LmpYSvU4Mm/5uGWYhlVi3ZpHEpA1BqprIzcoI hNxwTpPoZ/RwA== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <60cb9b954bb079b1f12379821a64faff00bb368e.1662432407.git.pliem@maxlinear.com> <166247313358.3585.5988889047992659412@kwain> From: Antoine Tenart Subject: Re: [PATCH v2 2/2] crypto: inside-secure - Select CRYPTO_AES config To: "herbert@gondor.apana.org.au" , Peter Harliman Liem Cc: "linux-crypto@vger.kernel.org" , linux-lgm-soc Message-ID: <166254049905.4625.8082287890585826042@kwain> Date: Wed, 07 Sep 2022 10:48:19 +0200 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Quoting Peter Harliman Liem (2022-09-07 08:46:32) > On 6/9/2022 10:05 pm, Antoine Tenart wrote: > >> CRYPTO_AES is needed for aes-related algo (e.g. > >> safexcel-gcm-aes, safexcel-xcbc-aes, safexcel-cmac-aes). > >> Without it, we observe failures when allocating transform > >> for those algo. > >> > >> Fixes: 363a90c2d517 ("crypto: safexcel/aes - switch to library version= of key expansion routine") > >=20 > > The above commit explicitly switched crypto drivers to use the AES > > library instead of the generic AES cipher one, which seems like a good > > move. What are the issues you're encountering and why the AES lib makes > > the driver to fail? >=20 > If I load the kernel module (CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not > set), I am getting failure messages below. > IMHO this happens because some functions in the driver still rely on > generic AES cipher (e.g. refer to safexcel_aead_gcm_cra_init() or > safexcel_xcbcmac_cra_init()), therefore CONFIG_CRYPTO_AES is still needed. That's possible, and the right fix might be what you proposed. I think it would be nice to understand what is failing and where, so we have a good argument for restoring the AES dependency (or not). > Maybe the alternative is to switch all of them to use AES lib instead? > Let me know if you prefer this. If the AES lib can be used instead of the AES generic implementation that would be great yes. If that's possible, depending on what is actually failing, yes please go for this solution. Otherwise restoring the AES dependency with a good explanation should work. Thanks! Antoine