Message ID | 20230519074047.1739879-1-dhowells@redhat.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0DBE7C77B7A for <linux-mm@archiver.kernel.org>; Fri, 19 May 2023 07:41:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 84FB8900006; Fri, 19 May 2023 03:41:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 7D939900003; Fri, 19 May 2023 03:41:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 65288900006; Fri, 19 May 2023 03:41:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 4F0F4900003 for <linux-mm@kvack.org>; Fri, 19 May 2023 03:41:11 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 17C0816099D for <linux-mm@kvack.org>; Fri, 19 May 2023 07:41:11 +0000 (UTC) X-FDA: 80806208742.09.501AA0E Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf09.hostedemail.com (Postfix) with ESMTP id 14AAB140007 for <linux-mm@kvack.org>; Fri, 19 May 2023 07:41:08 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IRG8kubv; spf=pass (imf09.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1684482069; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=0KfcB1OydV4rwmbYT4w5olAopDG1nKc4VGqZ0OSjoS0=; b=Z/SGflGjpbKCruJ4d617BcP2+/iqoje/YkMYrmu+pDvo6m+Wg2V+h96Em4ToOBwDnHxB0G ztHTfnycCaL0XV+YoD9tNFqJkANWBZUsj7PFXOkwgQrOMWyXm68dQrETNBIKUze5Vegfam qAK4QnjewkPVdTYFW2/CmpLOPPweDoo= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1684482069; a=rsa-sha256; cv=none; b=OwxXWh8R5W/PzL+hHTZb0+fGN5DEUKIISnU1XtGvZ9muls3+OFBLpLjwA8b/x3kHTfVwZr GjS3PkU1m6qfBCFBzAsfhqdzVsOMBe0U5VFdxhrm+cBqcmCIgU87dZUsv52HRALdRpPmbr qhcjFVuSVxYME8hh4/nAnL7eXCroZP0= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=IRG8kubv; spf=pass (imf09.hostedemail.com: domain of dhowells@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=dhowells@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684482068; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=0KfcB1OydV4rwmbYT4w5olAopDG1nKc4VGqZ0OSjoS0=; b=IRG8kubvbf8DSgkiK6Gvyh9hLw+E+rnKERBelNz8Uhwp037cwDuzk+sKmnStOuSjq9yKOz bKegXUxO9nhcDLRioWlrEiwLOtg284nRf0VbCEgi2/NII2AsGGaeBG+2BKVVObK2xme+DG h+aeZ4OgtrsmIHSklpEK4YMUJDaz2wg= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-556-dD1o4JJQP7qz_5TIdUc_iw-1; Fri, 19 May 2023 03:41:04 -0400 X-MC-Unique: dD1o4JJQP7qz_5TIdUc_iw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 262C429AB3F0; Fri, 19 May 2023 07:41:04 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.42.28.221]) by smtp.corp.redhat.com (Postfix) with ESMTP id A08342166B25; Fri, 19 May 2023 07:41:00 +0000 (UTC) From: David Howells <dhowells@redhat.com> To: Jens Axboe <axboe@kernel.dk>, Al Viro <viro@zeniv.linux.org.uk>, Christoph Hellwig <hch@infradead.org> Cc: David Howells <dhowells@redhat.com>, Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>, Jeff Layton <jlayton@kernel.org>, David Hildenbrand <david@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>, Logan Gunthorpe <logang@deltatee.com>, Hillf Danton <hdanton@sina.com>, Christian Brauner <brauner@kernel.org>, Linus Torvalds <torvalds@linux-foundation.org>, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH v20 00/32] splice, block: Use page pinning and kill ITER_PIPE Date: Fri, 19 May 2023 08:40:15 +0100 Message-Id: <20230519074047.1739879-1-dhowells@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Rspamd-Queue-Id: 14AAB140007 X-Rspam-User: X-Stat-Signature: k5oa4p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WCrh1QqLavuJp6zejNrzadg3iURJKe2mpdCzEGPg8n25bYo4AnPyxdYFnBhyyUbuHKCYuzQtJV/blvLM9RYUfhF38zKVDXijfk4RAF+GgC3b+2oWOs3fq/zAW33ztkTAvAQfipgT9fxK1Eyyw48c5ZKPYd33jZLbQLtw+TIDHQifvvpoSsgEck17u1rON8FNxaV7UX3eq1ot2pK6PR8giRqct/5odBasskuoRF70RmQsyLNCM3vXmf0mG1Bi/CsZJbDI26Y0oPUkLtqP8UiCR5e0Cq5pQNHSeMPRR8pFge6EOjwb5f5++ytiLXFsKk4ZGc8sUFEJR+25hOzOWoTU44etbJ1xifMptC0YQGJeRoiAK5+Br3DZKKDsR/FIhKqEToAY/6frzyN36159g9OrA8= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
splice, block: Use page pinning and kill ITER_PIPE
|
expand
|
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..