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 86CFBEB64D7 for ; Wed, 28 Jun 2023 18:28:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbjF1S2Z (ORCPT ); Wed, 28 Jun 2023 14:28:25 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:48069 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230401AbjF1S2Y (ORCPT ); Wed, 28 Jun 2023 14:28:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1687976854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=/rj34s/fUvdigcX1+hTWUHyuQ+LEjY4NckG6dmprRpg=; b=TIwNwMz/E8WAiuR4YRn5spqSuDsmjYWR7hk1GnCd6q5wdpQLsi/j8AatXXgfkKoZnvjdQL CN4IrxbkK82Ckbb/Ic7+dTDJd8DYY1UKWt6OmWUBbJl+kVp0q26hgHXsu1cdMO+RLpykPg TvwDJSgfLp4ZJBPU7EOPpfgxs/0ev9Y= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-418-bojcX7VlMZea6izeeIl3XA-1; Wed, 28 Jun 2023 14:27:28 -0400 X-MC-Unique: bojcX7VlMZea6izeeIl3XA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 10096800CAC; Wed, 28 Jun 2023 18:27:28 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2D804111F3B0; Wed, 28 Jun 2023 18:27:27 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <3299543.1687933850@warthog.procyon.org.uk> To: Matt Whitlock Cc: dhowells@redhat.com, Matthew Wilcox , Dave Chinner , linux-fsdevel@vger.kernel.org, Christoph Hellwig , Jens Axboe , Al Viro Subject: Re: [Reproducer] Corruption, possible race between splice and FALLOC_FL_PUNCH_HOLE MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3695108.1687976846.1@warthog.procyon.org.uk> Date: Wed, 28 Jun 2023 19:27:26 +0100 Message-ID: <3695109.1687976846@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Matt Whitlock wrote: > In other words, the currently implemented behavior is appropriate for > SPLICE_F_MOVE, but it is not appropriate for ~SPLICE_F_MOVE. The problems with SPLICE_F_MOVE is that it's only applicable to splicing *out* of a pipe. By the time you get that far the pages can already be corrupted by a shared-writable mmap or write(). David