From patchwork Tue Dec 12 10:12:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ahelenia_Ziemia=C5=84ska?= X-Patchwork-Id: 177228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp7629827vqy; Tue, 12 Dec 2023 02:30:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IGF+7tteKt1BGbE/xLvK7/XtTcBIr3Aoy2x/IujEWoZayrm4ifG94USVSNX0/WxkBFLpVpS X-Received: by 2002:a05:6870:e256:b0:1fb:29af:7359 with SMTP id d22-20020a056870e25600b001fb29af7359mr6799420oac.81.1702377032556; Tue, 12 Dec 2023 02:30:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702377032; cv=none; d=google.com; s=arc-20160816; b=TKXwnL6AhaU9pXcntdBlod7CyIXk9Z/avreOvrusSfePpNVaBmAB4eFLPH8NCatd3a ShcXwhAJlAKgkJzxawa/CSfMtaikayKKGKPZQpQMBShkrnsRzf4DMrd92aMQ2Ic97y2o HEY3pnSu+ngwyuMJZ+jn2E31PmlBVW2F/ZXhMvAzMUWhBx/zV6VRtEj9I0bQaNM2rvAj tJVZ+DxziEe9sR1I5Ihf7eGrDtw20sYP/EaR83Yc6aDcpn+MkOmRX/wyvyktVPGNLGcN eaG3/dBpsHVHsw10A+cN3Y1f82pCc3qyl1+hcN4oeS9Rq+uxi6f9yA6opNMkbe5+lvkQ qPBA== 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:user-agent:message-id:subject:to:from:date :dkim-signature; bh=GvZLqtGiAD5HV6WRcuoSK/eswkcxzJEDfPXTlf1JP2o=; fh=vH294dK40jZtN0IvUTUHO0iQSmz9++711kFjPkjy0zk=; b=ri8/Eg61FzGaxFf/B57wms/H+djY6LQNY4W6QcpQ10PWykAHzOkAeZo3KZJP3+YalJ 3Y6eGiAPz8JCiS2tk1vqV84qfh3eDSMFnpTs64axKV8VPH4BVq7VC++P8xVnVvqNbdSQ r/To5rJVc0bbrmKOgwxF3souPXNjWFCJPcHaU+Balnzpc6GY+qIsk4TZMeGOsindPKT5 evvdlvNEp5UooIP/f6uMnaM3DVVki15rR+tvJ7XKiDx28TFp2YfW99gOtLkyBddvKMe+ wnp39a1zghmsIiS83uSLghPXzS+NPaXcLuo5YzCxP0F/LIiwGWkeLtKVqnTFrUkywa9N qpUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=nP2cTzGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id o62-20020a634141000000b005c6b955fb89si7653217pga.204.2023.12.12.02.30.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 02:30:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=nP2cTzGK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id B22E280A1482; Tue, 12 Dec 2023 02:13:35 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235084AbjLLKNL (ORCPT + 99 others); Tue, 12 Dec 2023 05:13:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235061AbjLLKM7 (ORCPT ); Tue, 12 Dec 2023 05:12:59 -0500 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CC61136; Tue, 12 Dec 2023 02:12:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1702375972; bh=9LoORs0/qovVA+ZuFnVynVHHVy98EiReKRC+P8F39/0=; h=Date:From:To:Subject:References:In-Reply-To:From; b=nP2cTzGK93uab8yPQH14o6ln9eh/KHNoV9MN6Te0tHISKVXk5z5KPgksXxTIofUvY YgDGznUPcymXrcnLSO4HnyTwMODzQMY3WUzzvvehMPY7gI/JfZXkx06yiZBM1eHJYd mOtSGSlcWzY7A0HqYCRUr/By9lswuep07pBhj9mQAmnY1a9hEbU3b5p8bttVQ6SnpV LUdSjHpiRTjvg5RCla4TdpkmGA6Gn4RQONy0dtQbpk5kbV5nLm8sZtFp9V42S4DYW7 165rsI5itIXdfiJbZLVW3PFIHCxRLONRWyb5+lpUG2VVNZPfpdD1Cjeq3499C844xo tN8WXdYrbuBnQ== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id C5BE612A7E; Tue, 12 Dec 2023 11:12:52 +0100 (CET) Date: Tue, 12 Dec 2023 11:12:52 +0100 From: Ahelenia =?utf-8?q?Ziemia=C5=84ska?= To: Boris Pismenny , John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Message-ID: <10fffb097b4d2b328ef16e7353d6829f1ec9efcae.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> User-Agent: NeoMutt/20231103 References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1cover.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Tue, 12 Dec 2023 02:13:35 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779945798902264229 X-GMAIL-MSGID: 1785071698920099211 Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5is2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia ZiemiaƄska --- net/tls/tls_sw.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/net/tls/tls_sw.c b/net/tls/tls_sw.c index d1fc295b83b5..73d88c6739e8 100644 --- a/net/tls/tls_sw.c +++ b/net/tls/tls_sw.c @@ -2145,7 +2145,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, int chunk; int err; - err = tls_rx_reader_lock(sk, ctx, flags & SPLICE_F_NONBLOCK); + err = tls_rx_reader_lock(sk, ctx, true); if (err < 0) return err; @@ -2154,8 +2154,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff_t *ppos, } else { struct tls_decrypt_arg darg; - err = tls_rx_rec_wait(sk, NULL, flags & SPLICE_F_NONBLOCK, - true); + err = tls_rx_rec_wait(sk, NULL, true, true); if (err <= 0) goto splice_read_end;