Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5332918rwd; Mon, 5 Jun 2023 01:54:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6/GidvkNF6ym8i3sat8f+O6tSWbWPTkNoCafTI/PhtCuhTh2gfnujIG/FZz4B1axpt9pMb X-Received: by 2002:a17:90b:4c0c:b0:252:a208:1fef with SMTP id na12-20020a17090b4c0c00b00252a2081fefmr21802086pjb.0.1685955293632; Mon, 05 Jun 2023 01:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685955293; cv=none; d=google.com; s=arc-20160816; b=ZtMyeAVofyC2mR+edtv8U+Z1jqoGbvKs4vitYtodDvugE6EV3J1qOJ81NeDL0EvSiK +PGx281uBt/Qi6XjMPqHZPxGOh81spWHW5mHPVkoKWOimkVNmwCci93v5ryE1mQLwCxN nzycwT0vKQSfJl3wGoqNomEJ5DJQ5WpF6sBh/f8wtWIISO7duiwfmMMer2mElzYLaNOl Gzphi12BUXJGu7TX6ZMq1llIg9JRovbq/HM38KKTFbZfYGT/J9JqJsQgM8ZIPRqtObVy jG/UuBi2Wj2FsizTdYRstlPKz1YYPpIZ7VizoSXJSMxO7HlJDk3l6MSBjlRzoP87o/07 1xUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=2efDyMnTKN03AsKQ5+che23RgXMJ33pj6RSa8CFJuxc=; b=HNoyX8NtC5Ixm7HnvkaRg882YDD1KgZNbeE5PJGn0dya4rB1OFAx8SMAIxkJqTkC+s nx1kOcpce1Bi/01VgiltJzUDgAfX2kIUp/OtdFk8arffIhNH5OZA2GKrI+CApUGipu4W pNmDWK/ULhzB+dN3KQY6cskA8AkLHpSzYchOgRo7ohXElOOpOOAPN/ezlATKAEhv1B4n tkMkxZvKA4DrWKDMhCaaxNM8PvFMvExnAUDXikt01VXUoOQqhTLa/C+ZKehVQm7Uepfk HDTK7G3YhIPAfmjKWxp4ST8nrO7UOuCZ1MWB+apHi0pfv7NzcP15BJBJXZKrIlakcKBj KQDQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2-20020a17090abc8200b002594c8d9506si1466450pjr.159.2023.06.05.01.54.35; Mon, 05 Jun 2023 01:54:53 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230034AbjFEItl (ORCPT + 99 others); Mon, 5 Jun 2023 04:49:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjFEItk (ORCPT ); Mon, 5 Jun 2023 04:49:40 -0400 Received: from 167-179-156-38.a7b39c.syd.nbn.aussiebb.net (167-179-156-38.a7b39c.syd.nbn.aussiebb.net [167.179.156.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C785CD; Mon, 5 Jun 2023 01:49:39 -0700 (PDT) Received: from loth.rohan.me.apana.org.au ([192.168.167.2]) by formenos.hmeau.com with smtp (Exim 4.94.2 #2 (Debian)) id 1q65ti-00GsWv-Lb; Mon, 05 Jun 2023 16:49:07 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 05 Jun 2023 16:49:06 +0800 Date: Mon, 5 Jun 2023 16:49:06 +0800 From: Herbert Xu To: Linus Torvalds Cc: Roberto Sassu , David Howells , Andrew Morton , Eric Biggers , Stefan Berger , davem@davemloft.net, zohar@linux.ibm.com, dmitry.kasatkin@gmail.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com, Jarkko Sakkinen , linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [GIT PULL] Asymmetric keys fix for v6.4-rc5 Message-ID: References: <4d7e38ff5bbc496cb794b50e1c5c83bcd2317e69.camel@huaweicloud.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=2.7 required=5.0 tests=BAYES_00,HELO_DYNAMIC_IPADDR2, PDS_RDNS_DYNAMIC_FP,RDNS_DYNAMIC,SPF_HELO_NONE,SPF_PASS,TVD_RCVD_IP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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 On Fri, Jun 02, 2023 at 08:02:23PM -0400, Linus Torvalds wrote: > > I absolutely abhor the crypto interfaces. They all seem designed for > that "external DMA engine" case that seems so horrendously pointless > and slow. In practice so few of them are that, and we have all those > optimized routines for doing it all on the CPU - but have in the > meantime wasted all that time and effort into copying everything, > turning simple buffers into sg-bufs etc etc. The amount of indirection > and "set this state in the state machine" is just nasty, and this > seems to all be a prime example of it all. With some of it then > randomly going through some kthread too. You're right. Originally SG lists were used as the majority of our input came from network packets, in the form of skb's. They are easily translated into SG lists. This is still somewhat the case for parts of the Crypto API (e.g., skcipher and ahash). However, for akcipher the only user of the underlying API is the file in question so I absolutely agree that forcing it to go through an SG list is just wrong. I'll change the underlying akcipher interface to take pointers instead and hide the SG list stuff (along with the copying) inside API. In the mean time feel free to take this patch as it appears to be correct and should keep things chugging along while we work on the API. Acked-by: Herbert Xu Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt