Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2140046rwd; Fri, 19 May 2023 01:19:11 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5aIve8GS9IVZFjdJtaO4nDN4Oa0rpV44qBTN5PT6DoJ0jpl1qk9uzrpIZC0FIE3TV83c7J X-Received: by 2002:a05:6a20:748b:b0:102:a593:a17c with SMTP id p11-20020a056a20748b00b00102a593a17cmr3231521pzd.0.1684484350681; Fri, 19 May 2023 01:19:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684484350; cv=none; d=google.com; s=arc-20160816; b=G2w2htYDPu0rWHpYpXMvkCVE1txd2VBOpdxwcA2Ic6QoxSGpKw/zZnbOJmvktC2Klw 53CWVGnFZPyfcOFYeVvQcr9UKNWVZedkLvreR5d+IJKSwaEjTBtElzMEbRv1bMyPufcW 8bfcIUE7rPfGR8LhgYYW2uXvZ6TWHdlmL7figBcYXoV4cV5c+3wmElViNKi0IXuByEyI 6PIePNCuTJPZc1KRtWfDf+qd3JQue8xiNFojVcZtHBpYk3fSMlkwK9CETNcVZm0QCsSS vdxG7VCXh16CH1pl2xucSaKv50kUFdMjd0/pz496uYqjYnwiAgjL+UQGrFywHrAxkZC8 /f+Q== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=Kd5z80OJj0dUJeDURr2Zi4Eua7ZzLvvTOjXs2zK93gI=; b=N8Si4+8wjwLVmaU/5B8A4Z8HHvnGZh9mdGIZtRpnQikoJhxL1KDI5Ain45aJrRG6Io ZZLrjAochwUlT0dCTT0bJjHj4PwCaXqBR67ln/gkeqw+cLLLDg9tQcI7rg3ZbIPfRBAn Orz6MoCfBdKAl7yX0nSx7i9UCTn1R/cLk2Vac4eGtmBtZj150ZvrWvaJWvMZG0vewhlz LZil349OMxoKnV8GcC72+ZCaL1Gy8IL+irTSMnjht8LOuVqt2lHMDyozPUCw1gAmfpAI 0fI7RjtrmNOggtG0D1sORGHd+CrY3ACRDYsQnsYY7BMWsos3+LAQw6jv4UH37vNnOpAD ZUgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=LAMUe46z; 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 n7-20020a6543c7000000b005346c49e06esi3071180pgp.843.2023.05.19.01.18.55; Fri, 19 May 2023 01:19:10 -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=@infradead.org header.s=bombadil.20210309 header.b=LAMUe46z; 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 S229595AbjESIGk (ORCPT + 99 others); Fri, 19 May 2023 04:06:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229492AbjESIGj (ORCPT ); Fri, 19 May 2023 04:06:39 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DA3CDC; Fri, 19 May 2023 01:06:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Kd5z80OJj0dUJeDURr2Zi4Eua7ZzLvvTOjXs2zK93gI=; b=LAMUe46zdzmbVFG55DnnX4RtSF 4UrKdMQ97G7nP+GvDW6AS9tuP3lrT87WlHTyqfIesu/MMCSA7BKfNZhRWwQX2GMEn4QaCYW2N0+b5 Df76lHAk8f8BQxbYYaFB1tdNxJX4SG1adc66FG9zMz1gVPp+N0iygK9LW3rLnudfcWkijwBGHGb7s 5LiU0MGiY2lVXBEGJcrY83ehpzF8y/Zd2Yrrz5K8/vIxUiaWnNm463hkoriYQhLgeaEZf7iPJKZju k6VA8+bdI45OyAbPbYSF6kjLYn9FX09OKNrAQbWy4lj/Z14ED+XDFPbIipYavw2yGE+TYeC0RHeBT x7TtPPPQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pzv7y-00FSh2-2h; Fri, 19 May 2023 08:06:18 +0000 Date: Fri, 19 May 2023 01:06:18 -0700 From: Christoph Hellwig To: David Howells Cc: Jens Axboe , Al Viro , Christoph Hellwig , Matthew Wilcox , Jan Kara , Jeff Layton , David Hildenbrand , Jason Gunthorpe , Logan Gunthorpe , Hillf Danton , Christian Brauner , Linus Torvalds , linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v20 00/32] splice, block: Use page pinning and kill ITER_PIPE Message-ID: References: <20230519074047.1739879-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230519074047.1739879-1-dhowells@redhat.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Fri, May 19, 2023 at 08:40:15AM +0100, David Howells wrote: > Hi Jens, Al, Christoph, > > The first half of this patchset kills off ITER_PIPE to avoid a race between > truncate, iov_iter_revert() on the pipe and an as-yet incomplete DMA to a > bio with unpinned/unref'ed pages from an O_DIRECT splice read. This causes > memory corruption[2]. Instead, we use filemap_splice_read(), which invokes > the buffered file reading code and splices from the pagecache into the > pipe; direct_splice_read(), which bulk-allocates a buffer, reads into it > and then pushes the filled pages into the pipe; or handle it in > filesystem-specific code. If there's a clearly separate first and second half of a 32 patch series, it might really make sense to just split it instead of exceeding every normal attention window..