Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15936229rwd; Mon, 26 Jun 2023 03:34:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5wCWYhpRXg8WeQHtAWXMD6PFuYUVqnEPhdcWtnLxzTShfkm/pI6VL5MN0DoXInVHRn5TGa X-Received: by 2002:a17:906:73cc:b0:98d:b10f:f3cd with SMTP id n12-20020a17090673cc00b0098db10ff3cdmr4516592ejl.7.1687775663533; Mon, 26 Jun 2023 03:34:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687775663; cv=none; d=google.com; s=arc-20160816; b=cYRlNhmtX6nvdtaOy9nBoUuPInQOZ2P4qJF8YCs9sM26WVNsFrPXQi7uhrIaryCKWP z+X895/CmxBgXKp8xnpFS1vM6LMruYHiAuZdyZdICZMapeABl1cf1gBc+yXxs7iVJcjI hYt2xPFq+3057Qw3INYnqhWGA0Cp2wmKnufYWGYLBQNAacdyCZWlNQ7mA/zqWZ8ZAa72 pkvO6owh/Oy/4ZdOZ6NV3wFlOTY7ywHnMDJqcT6SY2JJ4CREO1Ze72ksUljdkPNPpBKf IfyH3R1GV3LKY3NLFB9Pl3YjBZ4e+TYUxF+o8RTQc1nwEs/gCRoPgCrAX77Dzi+HKxrC bqtQ== 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=DWy0GDzj/GnZg4lm6JmScxXOHrpz/5cW3dP35kayoGs=; fh=y3QNBJCCVh3qz0AViN4FlFadOTjBQpVqfIFgn/pDwzc=; b=a9Gz+Pxk2PANEB6MLYO6xroqYfBdKzGbtuFnOBVlCISQeHs4NIChdag67kDkcWhiwF hr8YY/ma4X8JEzdT40HrAx3sIctSTTcvtJ+Sl0e6FkuQdAAVFzr1gBEEIFF34qBxWMtd Est2w5CIWOZZ3dRY0zO6k5hOPbBqgc9KVdJmvjcboTydU7z8TVK8np7XtgaK3U8PYqUc a+EWG2WJOcUUFexVlrTpWS9sTROqTXloLmrHuBqp5wBsZadaTNUvLRaprYCOnyhYDFv7 WKwgl/C7cXWj23ESTpafCBpuF2dKx0Vi0TmYCNLjU8+D2yvbEv7zhR9/mHSAqLEXYfU0 DDiw== 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 q16-20020a170906361000b0098932a90cdasi2847366ejb.255.2023.06.26.03.33.34; Mon, 26 Jun 2023 03:34:23 -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 S229470AbjFZKOM (ORCPT + 99 others); Mon, 26 Jun 2023 06:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229457AbjFZKOL (ORCPT ); Mon, 26 Jun 2023 06:14:11 -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 ADB7B12B; Mon, 26 Jun 2023 03:14:09 -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 1qDjE8-007JHy-KW; Mon, 26 Jun 2023 18:13:45 +0800 Received: by loth.rohan.me.apana.org.au (sSMTP sendmail emulation); Mon, 26 Jun 2023 18:13:44 +0800 Date: Mon, 26 Jun 2023 18:13:44 +0800 From: Herbert Xu To: Ard Biesheuvel Cc: David Howells , Linus Torvalds , Roberto Sassu , Eric Biggers , Stefan Berger , Mimi Zohar , dmitry.kasatkin@gmail.com, Jarkko Sakkinen , keyrings@vger.kernel.org, Linux Crypto Mailing List Subject: Re: [v2 PATCH 0/5] crypto: Add akcipher interface without SGs Message-ID: References: <570802.1686660808@warthog.procyon.org.uk> 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 Mon, Jun 26, 2023 at 12:03:04PM +0200, Ard Biesheuvel wrote: > > In any case, what I would like to see addressed is the horrid scomp to > acomp layer that ties up megabytes of memory in scratch space, just to > emulate the acomp interface on top of scomp drivers, while no code > exists that makes use of the async nature. Do you have an idea on how > we might address this particular issue? The whole reason why need to allocate megabytes of memory is because of the lack of SG lists in the underlying algorithm. If they actually used SG lists and allocated pages as they went during decompression, then we wouldn't need to pre-allocate any memory at all. It's not going to be easy of course since we need to convert every single algorithm. Perhaps what we could do in the mean time is to get the scomp implementations do exponential retries (e.g., start with allocating size * 2, if that fails then double it, up to whatever we currently pre-allocate). Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt