Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp749687rdg; Thu, 12 Oct 2023 22:47:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGiNpg8wkRdJOxNMf6vsTn9yXjjjd3dyh6jAPo/85yD+Pz5HHpdpLHDRokbIgAFLoVMBWiL X-Received: by 2002:a17:90a:1904:b0:27d:1ec3:4367 with SMTP id 4-20020a17090a190400b0027d1ec34367mr3719118pjg.0.1697176063112; Thu, 12 Oct 2023 22:47:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697176063; cv=none; d=google.com; s=arc-20160816; b=R3gXnWjHO30abCk1JKCGzjfF+j7bxoQ0FLtFiUUQd5xmWPb686O9LahbuWH4K5ihOo EHdPqHXknHV9FCRb8oesYjs3Bg+kAczQIZU1DKTi1AqHYVqIopYUs6IRg6qOo6X12xkQ hyF/VQvNhvjMsxJVNQ7QJFXA/wirA13uzfBvDhE0jaj6BH4mwSNF9jb0k/qi54/238S5 Kc/U1BUdLf3lJw7OSm08egWwMfF20Blf5/UwmKUShoUeO9xgX8JgeRI/+yAYKvTfC/w0 QAj29quVklisfDWeeUtN/sXWdDw1yzFlb/sdM3LOjSJeV+KzAk+B41TC2aHiXZSJt2yl 8pzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=tph0kxeJzvVUW/v/moIeoK3u2WZRlf6/L/RRMFC2D9A=; fh=nhMuIlvpKOCChS12ibSXMPKcg2owj7YS8ovgsTJ04o8=; b=EQiuUgxUWj8MgDT3KdBfgrypnmg6w+EhV0Wv6aGhTFg+XweUkiQ4c/W5zpooOdfOTG IFqBUxhmXp/ILVLyCV0tPiB+qSWyuBLxNYUvgVqCt4nYZNaMzrn6EcY1J1XOgLOqAPv/ Szslalgq7ohenBlJBoXoNmHlgKa7fwMp78WDZ965e4GTIGS+a5M/YuOZuLzczQyX247N OIOKuC/6MVRPz8DoQMwep6+HXEEVhIOHK6okQjU/9AAE66LOiY5QDYCfjsPXC/fV/+fl 91Gw2bGtilxCgMPYTkUvtfcjgldAKlkYcmczvjkqYmV3D/xGem/c0CJhAiS9VI1o6OKQ LwIA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id go15-20020a17090b03cf00b0027cde38c731si3858141pjb.17.2023.10.12.22.47.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Oct 2023 22:47:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 012D48289524; Thu, 12 Oct 2023 22:47:41 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229657AbjJMFrZ (ORCPT + 99 others); Fri, 13 Oct 2023 01:47:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56934 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229587AbjJMFrY (ORCPT ); Fri, 13 Oct 2023 01:47:24 -0400 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [IPv6:2a0a:edc0:2:b01:1d::104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12AC7BC for ; Thu, 12 Oct 2023 22:47:23 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qrB14-0006Nk-RV; Fri, 13 Oct 2023 07:47:18 +0200 Received: from [2a0a:edc0:2:b01:1d::c0] (helo=ptx.whiteo.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qrB13-001KAR-0Y; Fri, 13 Oct 2023 07:47:17 +0200 Received: from sha by ptx.whiteo.stw.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1qrB12-00EDtH-U8; Fri, 13 Oct 2023 07:47:16 +0200 Date: Fri, 13 Oct 2023 07:47:16 +0200 From: Sascha Hauer To: Jens Axboe Cc: Boris Pismenny , netdev@vger.kernel.org, John Fastabend , linux-kernel@vger.kernel.org, io-uring@vger.kernel.org, kernel@pengutronix.de, Jakub Kicinski , Pavel Begunkov Subject: Re: Problem with io_uring splice and KTLS Message-ID: <20231013054716.GG3359458@pengutronix.de> References: <20231010141932.GD3114228@pengutronix.de> <20231012133407.GA3359458@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Sent-From: Pengutronix Hildesheim X-URL: http://www.pengutronix.de/ X-Accept-Language: de,en X-Accept-Content-Type: text/plain User-Agent: Mutt/1.10.1 (2018-07-13) X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: sha@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 12 Oct 2023 22:47:41 -0700 (PDT) On Thu, Oct 12, 2023 at 07:45:07PM -0600, Jens Axboe wrote: > On 10/12/23 7:34 AM, Sascha Hauer wrote: > > In case you don't have encryption hardware you can create an > > asynchronous encryption module using cryptd. Compile a kernel with > > CONFIG_CRYPTO_USER_API_AEAD and CONFIG_CRYPTO_CRYPTD and start the > > webserver with the '-c' option. /proc/crypto should then contain an > > entry with: > > > > name : gcm(aes) > > driver : cryptd(gcm_base(ctr(aes-generic),ghash-generic)) > > module : kernel > > priority : 150 > > I did a bit of prep work to ensure I had everything working for when > there's time to dive into it, but starting it with -c doesn't register > this entry. Turns out the bind() in there returns -1/ENOENT. Yes, that happens here as well, that's why I don't check for the error in the bind call. Nevertheless it has the desired effect that the new algorithm is registered and used from there on. BTW you only need to start the webserver once with -c. If you start it repeatedly with -c a new gcm(aes) instance is registered each time. I think what I am doing here is not the intended use case of cryptd and only works by accident. Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |