Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp301778rwb; Thu, 12 Jan 2023 20:21:17 -0800 (PST) X-Google-Smtp-Source: AMrXdXu0d17bXOtZtmbrJB903Xqj/b/0G+DzLBWBlUdsJ/utAECBmx8V84YzlTIWlXukG5IyRKJ3 X-Received: by 2002:a17:90a:6398:b0:223:de00:f5ab with SMTP id f24-20020a17090a639800b00223de00f5abmr80310577pjj.28.1673583677659; Thu, 12 Jan 2023 20:21:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673583677; cv=none; d=google.com; s=arc-20160816; b=MCS3dyw5N39oNC4Ew49VPXmaQIC7mS6h4Z0JJOAJaNfjhGLAMmtFV5B6c33PC6ZqS9 6yaQYw+MqJ7GoMl6v6M2n9vf2y/B0a4/TxFLPMLxAA3geoa9d21iRwcpHpKGfZlCOLSJ VuNrA9PbPKfFNiDG48GiuCyP1geVF1OsEjUiAlauVthOWxSz3SKzKRoKjOIvHQjFa3Vl PhPjbu3sRra3ybijN+2WiBWVa219C5+KFm40M7pnJ91bWSEmADORHqyvb3jd6E1BdiZn kIFAYbUyY/7BPTnA3hzDq6fGUog0Pbh3W06uVUKShv/JZfFxUqCtnuzxlf85cL50JG6C +nnw== 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=e4cfWhiU80fyCFZ0x6FllpUjAqmkPZD4EEbhr5AAm1M=; b=oy83Y+Hp1h8fR2CNF9OgC0TnWG/FOtAx4kUs7B63M1wkBhWNGODQ5R+r2oX4NKb9Kp r9mijmRpG5pJJZgN6eIVmR+fWAMQ7P9T+rU/Kdk1oaCSOsDOsI4rachqzJnI53OfWTyQ XRY0TGnZD1WKziG0IhRV6FUjgD+EBU4ET/DLP42amnrfvfxVEv7f86oRtpUnGKzQsUQb nGJKQeLk9tpkrGtZ5z3N8rtSXw3F9PHqkPfTHOSenXD+8gj/6MjzVPbCpdCs9f6kuN5C 8V0D/HjQWmjTMMlqExo/n70V0EQhunb0ADl85MdwbPfnl/+hmsEFOx+/YK8Z525qM5of V1Kw== 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 q4-20020a17090a938400b002266735a4b8si208675pjo.81.2023.01.12.20.21.00; Thu, 12 Jan 2023 20:21:17 -0800 (PST) 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 S232888AbjAMERQ (ORCPT + 99 others); Thu, 12 Jan 2023 23:17:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235540AbjAMEQV (ORCPT ); Thu, 12 Jan 2023 23:16:21 -0500 Received: from formenos.hmeau.com (helcar.hmeau.com [216.24.177.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C01C68CA7 for ; Thu, 12 Jan 2023 20:13:13 -0800 (PST) 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 1pGBRG-00H5JY-6G; Fri, 13 Jan 2023 12:13:11 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Fri, 13 Jan 2023 12:13:10 +0800 Date: Fri, 13 Jan 2023 12:13:10 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: linux-crypto@vger.kernel.org, ebiggers@kernel.org Subject: Re: [PATCH] crypto: skcipher - Use scatterwalk (un)map interface for dst and src buffers Message-ID: References: <20230102101846.116448-1-ardb@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230102101846.116448-1-ardb@kernel.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS 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 On Mon, Jan 02, 2023 at 11:18:46AM +0100, Ard Biesheuvel wrote: > The skcipher walk API implementation avoids scatterwalk_map() for > mapping the source and destination buffers, and invokes kmap_atomic() > directly if the buffer in question is not in low memory (which can only > happen on 32-bit architectures). This avoids some overhead on 64-bit > architectures, and most notably, permits the skcipher code to run with > preemption enabled. > > Now that scatterwalk_map() has been updated to use kmap_local(), none of > this is needed, so we can simply use scatterwalk_map/unmap instead. > > Signed-off-by: Ard Biesheuvel > --- > crypto/skcipher.c | 22 ++++------------------ > 1 file changed, 4 insertions(+), 18 deletions(-) Patch applied. Thanks. -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt