Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp2745958rdg; Mon, 16 Oct 2023 13:36:28 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGplvNyT2aNe9fBx0fwHyZoveI+ZSGiZ1Zi4geQD8RhZoaEvXts4k/RLuOk/7Eubb7gZRrJ X-Received: by 2002:a05:6a21:7185:b0:16b:7ab1:cf74 with SMTP id wq5-20020a056a21718500b0016b7ab1cf74mr158378pzb.33.1697488588009; Mon, 16 Oct 2023 13:36:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697488587; cv=none; d=google.com; s=arc-20160816; b=UmnndD5goRMGo6wyg/rbtc5TZpTfzDF6b+hsZ/Jb2fPeDRVp2eVZt8I8y5QN7rxz7R hi0vJ6cWjb54MCT4kPWgz3N3TPmPapeybT7bS4dPM2Nz8BV1pVHvl6bclu3Z4IC8Hlwa KzuOdJKo2kAzXjAJdLVnNc4DpA00GNJf/TPkFaVFcLYaLOp4+zGjUkP5TZaR210/xTCb yUHZ7uVNgwkkJyFtsZYxWSRqBhuDILrpo8noIUhxy6R0da/Gzu1YN2DsdwKqDc/lj5rl BgBPu6qy27sz0EB8D2r5xtRsEEpWM/fYzlSrw+2QG7to5op5l8QEa3xlS2Z8oXqGm3+E qazw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:from:date :dkim-signature; bh=SgVhm1POFGpo3yXYdwLtSO+R9fgppxSkqOFJ/Zl4G6g=; fh=aZmxRmvxoZlw0aVEwWHxGAsdH6sZcaq11OJRQV3SbRw=; b=bnSzKmwbzOlvLoX+o0t1ny4rA8xlThdyEdpSuuYlOESkjN1HYKtPtxDPEcOCCS4YaT xaJYBcrVwUc020rMicuAPkh6HJBokZ8nO8aiXKDh7WflgQTJQ8e7D7+16WFcbJURcp9M wOaKKEIQ8aO5ugKnrDhOMLBeFjQxeWZM0MR6OcsyuN2mGcAqBx0Gu8+i1A49LaH6Jh03 v26YJLMLsQI/19zi60JRImJ6uWQXQKoLh5zNjY3jx7pesOIZRQT4rIWggZcqySAJGvat dKGVPgDv/cxp3Pw75LYwOKLC2U021OfHoltof57WkV44dMlvS28jSSHHCgg9lW+pX49r HCdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jRVa45p8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nabijaczleweli.xyz Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id q5-20020a170902788500b001c9c9251e05si79162pll.476.2023.10.16.13.36.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 13:36:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@nabijaczleweli.xyz header.s=202305 header.b=jRVa45p8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 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 morse.vger.email (Postfix) with ESMTP id 96FDA8021B0F; Mon, 16 Oct 2023 13:36:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234296AbjJPUgM (ORCPT + 99 others); Mon, 16 Oct 2023 16:36:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234248AbjJPUgG (ORCPT ); Mon, 16 Oct 2023 16:36:06 -0400 Received: from tarta.nabijaczleweli.xyz (tarta.nabijaczleweli.xyz [139.28.40.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 498FD12D; Mon, 16 Oct 2023 13:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nabijaczleweli.xyz; s=202305; t=1697488554; bh=yKqnk4KdW1G8ysN8p/704fCo5DUzCZ+wWpZiakGmbbc=; h=Date:From:Cc:Subject:References:In-Reply-To:From; b=jRVa45p81I96MvAlHdov6fY8gT4VGBQoFIRSUCCfB6WfpqB46snLFIrXqqaC7D6tx qx2WoDz18lqvDyrYgQPZ7oxDzQ2bbLlGebQ6bmYjgr19EHMJNHV3ldO9ZmbLTSwp+f v6Ap2pIY0JNAwg6ZvUFfel2aFzlckL8o+bJkB0nfxwmtwHWGxZajW2/jbAhncs0CPx bv/5EUD++wYozIZLaSDlMF1luRAfwWuBv3NwS73kWGYk9IsC4meal1ogWUNtAzayYu 6SFiFSRvno0UvsRHN7hQXxVgmV8gmznX4kmKJjG5Of33d198+kPS4HHIeyO+AL2rQW UcFqRDvfltF1w== Received: from tarta.nabijaczleweli.xyz (unknown [192.168.1.250]) by tarta.nabijaczleweli.xyz (Postfix) with ESMTPSA id 7910D10418; Mon, 16 Oct 2023 22:35:54 +0200 (CEST) Date: Mon, 16 Oct 2023 22:35:54 +0200 From: Ahelenia =?utf-8?Q?Ziemia=C5=84ska?= Cc: Boris Pismenny , John Fastabend , Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 08/11] tls/sw: tls_sw_splice_read: always request non-blocking I/O Message-ID: <0fffb097b4d2b328ef16e7353d6829f1ec9efcae.1697486714.git.nabijaczleweli@nabijaczleweli.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="73zfmjpwwsl4usws" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20231006 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 morse.vger.email To: unlisted-recipients:; (no To-header on input) 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 (morse.vger.email [0.0.0.0]); Mon, 16 Oct 2023 13:36:24 -0700 (PDT) --73zfmjpwwsl4usws Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Otherwise we risk sleeping with the pipe locked for indeterminate lengths of time. Link: https://lore.kernel.org/linux-fsdevel/qk6hjuam54khlaikf2ssom6custxf5i= s2ekkaequf4hvode3ls@zgf7j5j4ubvw/t/#u Signed-off-by: Ahelenia Ziemia=C5=84ska --- 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; =20 - err =3D tls_rx_reader_lock(sk, ctx, flags & SPLICE_F_NONBLOCK); + err =3D tls_rx_reader_lock(sk, ctx, true); if (err < 0) return err; =20 @@ -2154,8 +2154,7 @@ ssize_t tls_sw_splice_read(struct socket *sock, loff= _t *ppos, } else { struct tls_decrypt_arg darg; =20 - err =3D tls_rx_rec_wait(sk, NULL, flags & SPLICE_F_NONBLOCK, - true); + err =3D tls_rx_rec_wait(sk, NULL, true, true); if (err <=3D 0) goto splice_read_end; =20 --=20 2.39.2 --73zfmjpwwsl4usws Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmUtnqoACgkQvP0LAY0m WPFlYhAAnkMDpuvV0EWTaMfU6iwNB92VTzc48ejj+wDFlYag8KeTHrZSj5Tapz7t mNy7Jz9XvCgH7eZcYKEC471JKkwwRK/lSo/sjaPlew/X881pIWG0KimcduEeYPrJ AU+qUaZurhgb/4FGFE/eQyLWl3J3ZByBxw0IEjK1TWESrBKf2qgPDFKaeDleb/V7 7snl8x/fwLvxZY84ErfggX+YlAU0ErqrMnwN7VoXmvnvnxh6WzLyqUZuq5m9P/6L t8sbnAzsCmNzG2Q3RM63kb/5Fo/PDuGsBkutk3nj57Szo3N+QWEv+ibAGNWADI+Q WHgAo5UVMWvimlHU2PeKEg08HQJpwG4fIA5EW27WTwmiqcayMDGUPRYoo2ZDdTL3 L6MdLvsUnDqTXvk1/rUBGimoUdK6+wY+FOtoP1ZsVKHA3fpKYKh2LmNYq9HdWnzF cc0UGI0LNMMkQJWXpSLlTXJqTZ6zu3uOjWAaBMi+73EweF928YWYOov2IGf+dDFe qz2yGTnvrDYyX6QlKnh+o+B5WGsU0t//ZLHUB78M3euF7KGdZmduyIJbl/b5uEe1 AOd5bAtty5kfi0DHJj1POJb2d5o4t840BkKMuyqcv3VDtWBKRR8Y8mv4jTTPpyK5 X7Qz4K14wdX0IOcHIITmIzgIlKmir3YImQ1e3A68YCi/U3p14UM= =Zwbs -----END PGP SIGNATURE----- --73zfmjpwwsl4usws--