Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1078203rwd; Wed, 31 May 2023 09:10:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4FJ9C1oVhKiBk5qls4AsuiTQRbEYQjn36K8lgsPGdfioj7y/paGOEOEvcYwR8dBMTNeh+D X-Received: by 2002:a05:6a20:8e25:b0:10d:b160:3d4f with SMTP id y37-20020a056a208e2500b0010db1603d4fmr7865539pzj.38.1685549452940; Wed, 31 May 2023 09:10:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685549452; cv=none; d=google.com; s=arc-20160816; b=hPx2jN6RNx0murNDvsOT6/RMWMSF/G5TVysze3bCJ8260htUaIc9RSTedMmMZ9z24c dj26pjAx9p/26xpjAL2my+XQcbJW0ZIwv4E63RdJ+ElUhAUuna/jYW0BaADrSmbsbpUu Le+nx0fc0OvOvtlFlHR1XzGOf18+JnmiSx75mIK2gNfOZdoCVecNa2CMjsAAEr/AOkcI uuozvXTrJpeE8rjEZwNEnh6zUv09L9OfsdGkbBI3PoQN43ebP71CTaOz6pcF4oglWYeh 5jFXV1gSLDL257jm0RlcQw3yVfinx4Rky5HtTLgwMiPsalvSEHJ/WB387o/7QeE967+O l53w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=xh+NM7DUxAEzTOJt7Ae/1UKGsTT1CaBWPKgHIK+Ua4s=; b=OorVvwnvWrpQhz5T2iY73m41c2XuRksoTYeM5QXXpywFbqOHL6/zuViWRVW4YGXNDi oETqIlMgh8KjNz6nE17/gLVtVSkz3LsQhinLVNXPEBRcESkhXQx4QGXq2GmVkQLuB9ig bXXEJ22y0i2p8DFEHq2AFXqKUS39Wamxz6q4aG5a+V2TjtzxnpRqwY0VCJH7KLfwLXKa iWvOIIY5MBSrlruKdMnheX49r3fdX14zPLFyp93x+LjYgx1TGRRrbJwERXyEhj47KG2k b3rLj33RHMuduBWbAIkKLo5+6A97EUKeNWjUvUthWoL0DFJEqzSlaNYLr1cyNkoZt9j6 0QwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=TeV2nuos; 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 b4-20020a639304000000b00535540cc8ccsi1210099pge.375.2023.05.31.09.10.38; Wed, 31 May 2023 09:10:52 -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=@kernel-dk.20221208.gappssmtp.com header.s=20221208 header.b=TeV2nuos; 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 S230446AbjEaPsi (ORCPT + 99 others); Wed, 31 May 2023 11:48:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230501AbjEaPsg (ORCPT ); Wed, 31 May 2023 11:48:36 -0400 Received: from mail-il1-x12f.google.com (mail-il1-x12f.google.com [IPv6:2607:f8b0:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6231C97 for ; Wed, 31 May 2023 08:48:35 -0700 (PDT) Received: by mail-il1-x12f.google.com with SMTP id e9e14a558f8ab-33bcc8f0d21so822905ab.1 for ; Wed, 31 May 2023 08:48:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20221208.gappssmtp.com; s=20221208; t=1685548115; x=1688140115; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xh+NM7DUxAEzTOJt7Ae/1UKGsTT1CaBWPKgHIK+Ua4s=; b=TeV2nuosxCCQSaB5ZclhgFC3ci1TbhrLaLO7YeIa++CfuP3tLyp3XgFpxvgwElWYJB tHOvz9UOWflYz0udLqW8SlXtramYgCn2tvTozp6JaEpMJEnUOIOc9htdjbFb9wvYSRcL Q9sgHw0VEfQJl89cB8p6S3BmlVvQ51rl2tUtJAP0ZFYUgvBVXjltJCIrCS2NNtp+8Dxx Ctg+EYHhUNQDa0WFaYpG+Dq1/lO8dS++A7XL0PkNnCt87heuEDDhP4nKE2bgY3mhTx8o ejL2+csFEJTi2h+Flhy8H6ZBi8Zxqv3ks3EYKU54mH0IQkZju6Ym/N47UBAkeuuRGS/b MQQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685548115; x=1688140115; h=content-transfer-encoding:mime-version:date:message-id:subject :references:in-reply-to:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xh+NM7DUxAEzTOJt7Ae/1UKGsTT1CaBWPKgHIK+Ua4s=; b=Y/8TvhH8tf7ktguwxk6deG6p51alKWHDvU2kW7fdZP0IJhqNU4GEDPyLp6L6w1ak5/ kedySkOFygcDLz4zIkCJEr4iYXvcmkte+c6fY4UArArtIRZxK5YBX4mdjE7Be9ASfzV+ mDY/f4PfPaoujU4L0bip3cvyQjy02nQ7dnBzBQJ8uIouHi0XZeK4AXecrKEnp/+ox3ko +fqf//XIx/n/YwTUwvOalPTt3mPfbs3FGKZCakPl/fz7yWTgmfcQL3Ratqs5TeWX+aZh 6r7f0cFEp+UgWacMo4F30HUbkXCgtNU37hhks6l8JvRgxUlLREwehvThrz+kO5dVD3gR zhEw== X-Gm-Message-State: AC+VfDwGgQ0UNnJ3OUrt3id+RNeKQ96vss32dzcc1vynajsrYrOZbngf aWbm2U9lIiIpZmomCnQtaqbbDA== X-Received: by 2002:a6b:8d53:0:b0:774:80fc:11a9 with SMTP id p80-20020a6b8d53000000b0077480fc11a9mr1999696iod.1.1685548114657; Wed, 31 May 2023 08:48:34 -0700 (PDT) Received: from [127.0.0.1] ([96.43.243.2]) by smtp.gmail.com with ESMTPSA id f16-20020a02a110000000b004091d72f62dsm1552201jag.85.2023.05.31.08.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 May 2023 08:48:33 -0700 (PDT) From: Jens Axboe To: Christoph Hellwig , David Hildenbrand , Lorenzo Stoakes , David Howells Cc: Al Viro , Matthew Wilcox , Jan Kara , Jeff Layton , 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, Jason Gunthorpe In-Reply-To: <20230526214142.958751-1-dhowells@redhat.com> References: <20230526214142.958751-1-dhowells@redhat.com> Subject: Re: [PATCH v4 0/3] block: Make old dio use iov_iter_extract_pages() and page pinning Message-Id: <168554811322.183150.13490236053670818511.b4-ty@kernel.dk> Date: Wed, 31 May 2023 09:48:33 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.13-dev-00303 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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, 26 May 2023 22:41:39 +0100, David Howells wrote: > Here are three patches that go on top of the similar patches for bio > structs now in the block tree that make the old block direct-IO code use > iov_iter_extract_pages() and page pinning. > > There are three patches: > > (1) Make page pinning neither add nor remove a pin to/from a ZERO_PAGE, > thereby allowing the dio code to insert zero pages in the middle of > dealing with pinned pages. This also mitigates a potential problem > whereby userspace could force the overrun the pin counter of a zero > page. > > [...] Applied, thanks! [1/3] mm: Don't pin ZERO_PAGE in pin_user_pages() commit: c8070b78751955e59b42457b974bea4a4fe00187 [2/3] mm: Provide a function to get an additional pin on a page commit: 1101fb8f89e5fc548c4d0ad66750e98980291815 [3/3] block: Use iov_iter_extract_pages() and page pinning in direct-io.c commit: 1ccf164ec866cb8575ab9b2e219fca875089c60e Best regards, -- Jens Axboe