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 9C516C77B7A for ; Fri, 19 May 2023 08:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229502AbjESIGk (ORCPT ); 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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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..