Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15931184rwd; Mon, 26 Jun 2023 03:29:34 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7tHhc5gyxLtNT6ZMcjHOcbGVzEJmKuYs547O8YRlC6QJmWQtBOV7PMPvC+7aqJbqjghOB8 X-Received: by 2002:a05:6a00:24cf:b0:676:2a5c:7bc5 with SMTP id d15-20020a056a0024cf00b006762a5c7bc5mr3373002pfv.1.1687775374611; Mon, 26 Jun 2023 03:29:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687775374; cv=none; d=google.com; s=arc-20160816; b=JSziJaL7KK0sQLYyP13DN5mu7NXHkb//ZS8GvpAnREjY13Mvo32+uSp9Xq9/OJem22 6mZqSTFE/djsPstCL0MDFBiR53LCgH4OROY6CNUfzHaLf5/gyzV+O+BYyE5NmPh+N03w 1O8J5meXbsWWB4SxWIyvA1Ib24k6rnrU1o5ZNrU3dNeE9yGg7ONtOTsYub3BEwLOv98Z FG/gCx0pfyBe3YHfUW8ZaaOi4OPGYML7ECqwoyOPJWn4tNhtz/79IIitLQeWtBugJTwe I5Kx+c7jitmVHfFCck63jmFRUHhE1BT0XeyGm4j8xl8zIVD4g/ZUeeXolYaHhyoVhmx2 8TYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=B4gYO3H3siIkZ2HVAuNoNElSTbLCbI2tGFKxzerw3fs=; fh=NZu7qcTHiYAaQeg2cNKTwjHSg8/kv0EFuc3L8EIY9+g=; b=orGZQOMRF7vpX23FuH4+nbd5FcirlzvEPGNOb9REKDrhIidatCfCmWckjGLEqosHGC stumV2m8hFg8NryBg8Vj+p7rt7fsd6UxiqiFHRnMUU+OPzyreFBl7WYsQrZsG6YlmGsS /sMwQw0ZgD4ItaGMGMsvMR/nREY/Vfxt0SMJU8uuofuyvub1za7iDhQv7wjn48v47oYL 6MTm2PSSlzMYGytjqbTh94Fd6IhW7NZZLA0Jvz4lS3h8b/VNYA7eUGBDNI4AUrY/tLu0 Wy4SXzwy7kaGyy/oM+F/4tlSl4BB2R2X1YBuJKil2mXuhH2qgqTcEio8fPOXZVXykmbi /f3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HOakoZYe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fa21-20020a056a002d1500b0064d6c74a8bbsi4826396pfb.98.2023.06.26.03.29.16; Mon, 26 Jun 2023 03:29:34 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HOakoZYe; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229869AbjFZKDV (ORCPT + 99 others); Mon, 26 Jun 2023 06:03:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjFZKDU (ORCPT ); Mon, 26 Jun 2023 06:03:20 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FA84F7; Mon, 26 Jun 2023 03:03:19 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D826C60DCE; Mon, 26 Jun 2023 10:03:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 394BCC433C0; Mon, 26 Jun 2023 10:03:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687773798; bh=UqNdbH12vGv5bgEgr6ErXvWYZgLTnT4RZ3ci+ioCggY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HOakoZYe27iHTkmoM8p8IdHE1d6aWQoubYIMBZcgRrq/bXTTs52BmL07BUA6/kow3 KZLmtv1Dhpppl+rdO+rkPs777E0wJRTY2x4Z43uEVnS5qEpx5bfdkw0eyXwqcy7z90 I3Vo2Ou31xGbd6ey5PD47KqDuGnk1f2dOVIl6nzQdFjSMqZCGVXWFmlO/uwk349M5/ z6Ax6Mk7MD8CSYRgkOJ3D3+YXrGGrAgOfAGlntpPRdrOFyho4GzGeK8FlqSNJTnD4/ ytkWbzn351l0dZUDYM9YdGwB1lQws0TUX6zybDGD/TGPPzCSorkFdt1WHUBQ4wpRaB 6SdVevqw8mm8Q== Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-2b698937f85so22416281fa.2; Mon, 26 Jun 2023 03:03:18 -0700 (PDT) X-Gm-Message-State: AC+VfDwoyioyJQztzTYwT8mHH0+Cf+vs+1+pXiVz7/9BW1GypnUmaT6E VGC0dOYOOBhxlVnrRL1l4l8uLbsk+hZkJBUHkfc= X-Received: by 2002:a2e:9cd1:0:b0:2b4:70c1:b484 with SMTP id g17-20020a2e9cd1000000b002b470c1b484mr15570073ljj.38.1687773796264; Mon, 26 Jun 2023 03:03:16 -0700 (PDT) MIME-Version: 1.0 References: <570802.1686660808@warthog.procyon.org.uk> In-Reply-To: From: Ard Biesheuvel Date: Mon, 26 Jun 2023 12:03:04 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [v2 PATCH 0/5] crypto: Add akcipher interface without SGs To: Herbert Xu 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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, 26 Jun 2023 at 11:53, Herbert Xu wrote: > > On Mon, Jun 26, 2023 at 11:21:20AM +0200, Ard Biesheuvel wrote: > > > > As I asked before, could we do the same for the acomp API? The only > > existing user blocks on the completion, and the vast majority of > > implementations is software only. > > We already have scomp. It's not exported so we could export it. > > However, compression is quite different because it was one of the > original network stack algorithms (IPcomp). So SG will always be > needed. > > In fact, if anything SG fits quite well with decompression because > it would allow us to allocate pages as we go, avoiding the need > to allocate a large chunk of memory at the start as we do today. > > We don't make use of that ability today but that's something that > I'd like to address. > OK, so you are saying that you'd like to see the code in net/xfrm/xfrm_ipcomp.c ported to acomp, so that IPcomp can be backed using h/w offload? Would that be a tidying up exercise? Or does that actually address a real-world use case? 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?