Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1028181pxa; Thu, 20 Aug 2020 00:02:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy86tkl4YZDlzlF+H6pa57/pbCjrEm0bzFYiyTDzseOnKim7Uwjye/R1wxI83pbndFVfY/B X-Received: by 2002:aa7:cd76:: with SMTP id ca22mr1577147edb.42.1597906934588; Thu, 20 Aug 2020 00:02:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597906934; cv=none; d=google.com; s=arc-20160816; b=02B+iBOs1A91CCTtKb9V6FkXLaaaXsrAb87Hj6ERdqLr/WruP2UfiHlsd4I6gDQBJ7 M0ypac8M1Rrvd/m3AhvGwN25gU9Ja+QfRz0v74ySNUC/2euUc0OGUCbTfwIVa9ZoqiIV utHp9IHVGXY181ermcpYudDGcAPPFWghjiYpx/i/tbaEZ5PBBgs6BIokCHedRVrYgW/e c2/S8DDDbt8YEToJ+rFPEsyL38dcfUHcfE064isNOZLPs9HWEmiyNv/1Ku8isFD9ouRd taYOKvZ2GXBe2QmZ5N/OdLxgQMZde+rAkyBXAjNDT2S8WtMsBC/K43zA6prHWq0x7qSR QUNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=UfThNikq0Dt1hIcVdhqf+4y4XI5fBFJLjFV9qgjrKPo=; b=ejmoPXGjExOR/o2HYXRabbliJ+Qhy8YdmfQpXIaJfCnw2PcEZzSKw6qEgIlmV2Bp/M xeLj0O7gQDTffq0F+O32+UdSCUq3+s1/h6Zxp2fcHRkCSAyEC57Obcdk45iaaRrgNrSt +o9qOfHqVOyme+Mb4sftRXs7lDiTtxOQKJdweMpLROqGu4o/1HUbZW6m1Hc8YD1t345b QwP0Npy7tOttXSERF8Z/5Ef/eo72sbYTD8t5tw6722tesfm8SPtm/L2DXfx5M5Xeks8i y3S+htU/P8WgZBQ5j6kebdVfvXKN3Z7xo1l0A9uRJK8of2GxWsyIiyL8DSuKLvBB0nQW U5rA== 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 d24si784844ejo.567.2020.08.20.00.01.50; Thu, 20 Aug 2020 00:02:14 -0700 (PDT) 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 S1726325AbgHTHBq (ORCPT + 99 others); Thu, 20 Aug 2020 03:01:46 -0400 Received: from helcar.hmeau.com ([216.24.177.18]:48904 "EHLO fornost.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbgHTHBq (ORCPT ); Thu, 20 Aug 2020 03:01:46 -0400 Received: from gwarestrin.arnor.me.apana.org.au ([192.168.0.7]) by fornost.hmeau.com with smtp (Exim 4.92 #5 (Debian)) id 1k8eZy-0005rQ-Nc; Thu, 20 Aug 2020 17:01:43 +1000 Received: by gwarestrin.arnor.me.apana.org.au (sSMTP sendmail emulation); Thu, 20 Aug 2020 17:01:42 +1000 Date: Thu, 20 Aug 2020 17:01:42 +1000 From: Herbert Xu To: Ard Biesheuvel Cc: Ben Greear , Linux Crypto Mailing List , Eric Biggers Subject: Re: [PATCH 0/5] crypto: Implement cmac based on cbc skcipher Message-ID: <20200820070142.GA21343@gondor.apana.org.au> References: <20200818135128.GA25652@gondor.apana.org.au> <2aad9569-877e-4398-88ef-e40d9bbf7656@candelatech.com> <20200818140532.GA25807@gondor.apana.org.au> <20200818221550.GA27421@gondor.apana.org.au> <20200818222719.GA27622@gondor.apana.org.au> <20200818223359.GA27712@gondor.apana.org.au> <8b248ef3-d4c7-43fd-6ae4-1c3381597579@candelatech.com> 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) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Thu, Aug 20, 2020 at 08:58:15AM +0200, Ard Biesheuvel wrote: > > But if we look at the actual issue at hand, we might also look into > amortizing the FPU preserve/restore over multiple invocations of a > cipher. I proposed a patch a while ago that makes cipher an internal > crypto API abstraction, and we could easily add pre/post hooks that > preserve/restore the FPU in this case, in which case we would not need > any changes at higher levels. I think any use of SIMD crypto_cipher on bulk data is just wrong. Because the performance degradation when SIMD cannot be used is too great for this to make sense. So optimising the FPU overhead is attacking the wrong problem. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt