Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp21129018rwd; Thu, 29 Jun 2023 11:19:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlE+j9eQwBW4f+Tmuuf1pAMLfw6GTl0quVhwnY5405DtmoAD3OXnhbsKSQR8BFjBWgZ1OKwM X-Received: by 2002:a05:6a20:7289:b0:12c:e745:78b3 with SMTP id o9-20020a056a20728900b0012ce74578b3mr390805pzk.62.1688062785910; Thu, 29 Jun 2023 11:19:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688062785; cv=none; d=google.com; s=arc-20160816; b=Q6TIN+rnWB7xLWsOvMKkEw0Nl0uTspiuAuWzMCa1maLiZmzZwSYxr0/tJVO5biw2r8 XYoB+BAYhr5ZEEhcYBWvoEKVoJgrZn9sFkjbF13seSiXKcZxPeAU1hyWTbq+8KnKQ6yM p7Mu0I4940mGH/EIZl2rMGstN1++CiRsC+t4k+vRXg1hi74W77an4sCPnxrkZ+wFKX6C YymfAkaJUTS80ROqzI3R37AAkrJK1fC5Twlx4roQBMgdznu2cdUI+/xbROFhpLaCeqzV 1m+jjnT9KU8Oqn+0hXjXqhYPs7XR3zQ6HospXO7/FfWpWVdSXDxN6WYmM/Hg+zeHaUUP /CZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:user-agent:references :in-reply-to:message-id:mime-version:date:subject:cc:to:from :dkim-signature; bh=n3lCJnmHXgrKtY1GgvvLvqdYKQaVBuxxsH4QSdYckhY=; fh=KwwaxdHSK3r0PYCyXLBpM0FXBZCp935LWBI/8YBhEsY=; b=REQqOdoBtFnVhV40iep+kx5YRQayneKpGU8YBUOeYtpC0Bjq8nz9S2wjbRh9Td8Fy2 vIKwIQyeDsjB+e9A9GTiXP3UwdzVbxTL+f1fNrIU2gc9JwG3upAd9ytg3mgopYle4FjA SVXFeqlU4+0aCEevffGc5INTxNEPVAOcl3ywgjEjws0rL9KHFkLbM1KKQBFtnAeDj7GR qCpTMdeWRXGyD+H7XaxXtiabw//AemrfFMKDr3s+3t3SRtK+rWSs/kyOylNerUzaS3BE wZMeWD9lmk5GvutmDh3RL+IhRfWK4sixqirgSNsTGJmBfWpCurSxBzVN4BJ8kDEIx82T OdUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@comcastmailservice.net header.s=20211018a header.b=dTBbay14; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-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 p39-20020a056a000a2700b0067ca868e7a2si5573538pfh.309.2023.06.29.11.19.28; Thu, 29 Jun 2023 11:19:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@comcastmailservice.net header.s=20211018a header.b=dTBbay14; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231933AbjF2SIC (ORCPT + 99 others); Thu, 29 Jun 2023 14:08:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbjF2SIA (ORCPT ); Thu, 29 Jun 2023 14:08:00 -0400 X-Greylist: delayed 150 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 29 Jun 2023 11:07:59 PDT Received: from resdmta-h1p-028598.sys.comcast.net (resdmta-h1p-028598.sys.comcast.net [IPv6:2001:558:fd02:2446::e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48EDC26B6 for ; Thu, 29 Jun 2023 11:07:59 -0700 (PDT) Received: from resomta-h1p-027911.sys.comcast.net ([96.102.179.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resdmta-h1p-028598.sys.comcast.net with ESMTP id EqqtqlsxnoJB8Ew1IqV9zc; Thu, 29 Jun 2023 18:05:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1688061928; bh=n3lCJnmHXgrKtY1GgvvLvqdYKQaVBuxxsH4QSdYckhY=; h=Received:Received:From:To:Subject:Date:MIME-Version:Message-ID: Content-Type:Xfinity-Spam-Result; b=dTBbay140O/+Ve8xLz6rmU50UEDtYGTFtOj6x6yixlDDvMj6uk5194hSoB5kEdxye u7hIiRqZZvQFTsxXpY6aA3FCu/Ot309mG/riXsnDm5mkTAXS4kxA/G+V1K6+w63q3O 78RcgaAz2phwkJEznI8jkJRvMidXuZaz+6F1xEDQriuckd5qviOMTU0k3r8+UcQUch j+FuwvoaUNme/T94UMX4MI3d0oHWgMhNe+T8UF6E26eHstvRZmYKkCg7Sic/Cf+QQt 1+9jgYVhkKw+V27KtNNSsLhKIVYVVO0INcdEYlTghcyFpPD05SFEId8awwa8RL/GJg 3Bo1uw1b5Kg0A== Received: from localhost ([IPv6:2601:18c:9082:afd:219:d1ff:fe75:dc2f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-h1p-027911.sys.comcast.net with ESMTPSA id Ew17qC5nh2DGmEw19qI2Ra; Thu, 29 Jun 2023 18:05:23 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit From: Matt Whitlock To: Linus Torvalds Cc: David Howells , , Matthew Wilcox , Dave Chinner , Jens Axboe , , , Subject: Re: [RFC PATCH 0/4] splice: Fix corruption in data spliced to pipe Date: Thu, 29 Jun 2023 14:05:16 -0400 MIME-Version: 1.0 Message-ID: <4bd92932-c9d2-4cc8-b730-24c749087e39@mattwhitlock.name> In-Reply-To: References: <20230629155433.4170837-1-dhowells@redhat.com> User-Agent: Trojita/v0.7-595-g7738cd47; Qt/5.15.10; xcb; Linux; Gentoo Linux Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MIME_QP_LONG_LINE,SPF_HELO_PASS,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-kernel@vger.kernel.org On Thursday, 29 June 2023 13:56:04 EDT, Linus Torvalds wrote: > On Thu, 29 Jun 2023 at 08:55, David Howells wrote: >>=20 >> Matt Whitlock, Matthew Wilcox and Dave Chinner are of the=20 >> opinion that data >> in the pipe must not be seen to change and that if it does, this is a bug.= > > I'm not convinced. > > The whole *point* of vmsplice (and splicing from a file) is the zero-copy. > > If you don't want the zero-copy, then you should use just "write()". If you want zero copies, then call splice() *with* SPLICE_F_MOVE. If you want one copy (kernel-to-kernel), then call splice() *without*=20 SPLICE_F_MOVE. If you want two copies (kernel-to-user + user-to-kernel), call read() and=20 write(). I don't know why SPLICE_F_MOVE is being ignored in this thread. Sure, maybe=20= the way it has historically been implemented was only relevant when the=20 input FD is a pipe, but that's not what the man page implies. You have the=20= opportunity to make it actually do what it says on the tin.