From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F04D8C001DE for ; Wed, 19 Jul 2023 18:02:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbjGSSCB (ORCPT ); Wed, 19 Jul 2023 14:02:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229788AbjGSSB4 (ORCPT ); Wed, 19 Jul 2023 14:01:56 -0400 X-Greylist: delayed 150 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 19 Jul 2023 11:01:54 PDT Received: from resqmta-a1p-077723.sys.comcast.net (resqmta-a1p-077723.sys.comcast.net [IPv6:2001:558:fd01:2bb4::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C80C31FCB for ; Wed, 19 Jul 2023 11:01:54 -0700 (PDT) Received: from resomta-a1p-076786.sys.comcast.net ([96.103.145.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resqmta-a1p-077723.sys.comcast.net with ESMTP id M6wkqkn2jHilbMBSMqc5jG; Wed, 19 Jul 2023 17:59:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcastmailservice.net; s=20211018a; t=1689789562; bh=/6lKYap9PZZRLrRmess6iU23U+m+a8OOtwMIqKZ8RIU=; h=Received:Received:From:To:Subject:Date:MIME-Version:Message-ID: Content-Type:Xfinity-Spam-Result; b=VcFEsTlS20BqPr681CCCNRDmpZF0XE0c2jsps2LTPbxdVDQRqPf0okAEeYqEhlqxN xp+3uoJEGCU+zC7GZkgZepLimVtp39sNQWbTt1UrV/OD1BR3wEWhfG0P+C3cdtKFLM LsCZSQROEyDbgA4ILeQ3QctKhL4sKi1faNS5cO9rb9UOhWNjJLRpGRTnLlZMNRLGcP 1qdkoyGtMPGAL5FTAfS2cZITQo0KsabCrRopFgH4YHANauoEVrezgdA/LyCZ96KHL2 7EQpWKwrLQUxOxD9eEczAS07louswlIQzli2YjutUK2qVQtsO6j5tlwDsPHGpc82Hp LbKd36X1Bxd9g== 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-a1p-076786.sys.comcast.net with ESMTPSA id MBSEqFdsmeadOMBSEqzqUD; Wed, 19 Jul 2023 17:59:18 +0000 X-Xfinity-VMeta: sc=-100.00;st=legit From: Matt Whitlock To: Miklos Szeredi Cc: David Howells , , Matthew Wilcox , Dave Chinner , Linus Torvalds , Jens Axboe , , , , Christoph Hellwig , Subject: Re: [RFC PATCH 1/4] splice: Fix corruption of spliced data after =?iso-8859-1?Q?splice()_returns?= Date: Wed, 19 Jul 2023 13:59:13 -0400 MIME-Version: 1.0 Message-ID: In-Reply-To: References: <20230629155433.4170837-1-dhowells@redhat.com> <20230629155433.4170837-2-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday, 19 July 2023 06:17:51 EDT, Miklos Szeredi wrote: > On Thu, 29 Jun 2023 at 17:56, David Howells wrote: >>=20 >> Splicing data from, say, a file into a pipe currently leaves the source >> pages in the pipe after splice() returns - but this means that those pages= >> can be subsequently modified by shared-writable mmap(), write(), >> fallocate(), etc. before they're consumed. > > What is this trying to fix? The above behavior is well known, so > it's not likely to be a problem. Respectfully, it's not well-known, as it's not documented. If the splice(2)=20= man page had mentioned that pages can be mutated after they're already=20 ostensibly at rest in the output pipe buffer, then my nightly backups=20 wouldn't have been incurring corruption silently for many months.