Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp4466739pxu; Wed, 9 Dec 2020 18:56:53 -0800 (PST) X-Google-Smtp-Source: ABdhPJylrGG6KGzrkG9PUazo4Lpvg4R1L1YGW9IIFYSoCO6NwWNuo3kmt/Hlb+O3NIGW/bSEHbsL X-Received: by 2002:a17:906:38d6:: with SMTP id r22mr4448919ejd.149.1607569013388; Wed, 09 Dec 2020 18:56:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607569013; cv=none; d=google.com; s=arc-20160816; b=p0Z50pDIc2Uxw3cmskliCCppYAP2+pleJ3h3fIhpSlPkiT2SQipBdy8lUb6PXM/o5E Q2bJ5GevWJDm4JMEfjPpoBV+CM+qioUOE6p2mKEFzzO/vthFqLv+js2ra4sITa6Rye2F T9q6LaAs1FqYIpf/YL/OZevWb8Vt6VKpaXoAE0oqSs/977qMwRK2Ls5MFcvvnAsbt6dA fJyThFknzU+6TrKNcIFjIu5CiJUss9/TqfzKx/wEHKE/7EKkuZK438FKMlmwALAtvufw rNTLoCWPVfIDSZzlPylDA1vnrhwgR4KTxaAv9Qe3cfukb3XBZjv+S5PBCRAz+PBPJqlI 2YRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=NsFiiF1T8Kh0Rmuf/wTOgqiziHovh9iQtJowYvgg1GI=; b=fbcIxcW/KT1mEcun8coYss8cRxp2eAU1gtgiKIJqFdTwmuzp4U+o3yuxos7lOiN9OL 32LLXCmnARb3SUdqyx6rVmpo9gCz8iNoJff+mlBzII8ZdXNH4zIKBsBJccbdj/IMK2Xz i4QhLhaDnd3p46asP05fHkU7V7nt2kbSKH9Mbkcoh5ersgOk4hHfC5fNXNV9ZC5bA/8Y kOoe/rEqOh9JPPYFN272MLaBzXamo28fgEzxLwhmp8kn5ZiNn6jqbw9QG3fBCXMkPW9u avIPPcpPcLyFrf4sDQenC1GztMxAIBIe2l5JhVvTo/p/IRjtvh5X/0nv7HOgw1TP+Ynr p5KA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o3si1731345ejn.637.2020.12.09.18.56.19; Wed, 09 Dec 2020 18:56:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727305AbgLJCoh (ORCPT + 99 others); Wed, 9 Dec 2020 21:44:37 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:55748 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726825AbgLJCo1 (ORCPT ); Wed, 9 Dec 2020 21:44:27 -0500 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1knBvi-0004u5-8K; Thu, 10 Dec 2020 13:43:43 +1100 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 10 Dec 2020 13:43:42 +1100 Date: Thu, 10 Dec 2020 13:43:42 +1100 From: Herbert Xu To: Ard Biesheuvel Cc: Linux Crypto Mailing List , Ben Greear , Steve deRosier Subject: Re: [PATCH v2] crypto: aesni - add ccm(aes) algorithm implementation Message-ID: <20201210024342.GA26428@gondor.apana.org.au> References: <20201201194556.5220-1-ardb@kernel.org> <20201201215722.GA31941@gondor.apana.org.au> <20201201220431.GA32072@gondor.apana.org.au> <20201201221628.GA32130@gondor.apana.org.au> <20201201231158.GA32274@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Dec 10, 2020 at 01:18:12AM +0100, Ard Biesheuvel wrote: > > One thing I realized just now is that in the current situation, all > the synchronous skciphers already degrade like this. > > I.e., in Ben's case, without the special ccm implementation, ccm(aes) > will resolve to ccm(ctr(aesni),cbcmac(aesni)), which is instantiated > as a sync skcipher using the ctr and ccm/cbcmac templates built on top > of the AES-NI cipher (not skcipher). This cipher will also fall back > to suboptimal scalar code if the SIMD is in use in process context. Sure, your patch is not making it any worse. But I don't think the extra code is worth it considering that you're still going to be running into that slow fallback path all the time. Much better to fix the wireless code to actually go async. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt