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 DD503C77B7A for ; Wed, 31 May 2023 15:48:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231860AbjEaPsh (ORCPT ); Wed, 31 May 2023 11:48:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35192 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230446AbjEaPsg (ORCPT ); Wed, 31 May 2023 11:48:36 -0400 Received: from mail-il1-x136.google.com (mail-il1-x136.google.com [IPv6:2607:f8b0:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60E078E for ; Wed, 31 May 2023 08:48:35 -0700 (PDT) Received: by mail-il1-x136.google.com with SMTP id e9e14a558f8ab-339fca7da2aso2001695ab.0 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=bVK+atcuRXA85PXtqEmXtPJBd7xuduca/LxeGTwI+cpIqVfxlDTQQPhb+TTXDP0x8K b6AqBQF8KPfV29CI1GdFpQWGNZgUcA6iGosPIiTqUyYVDfS+9fG5GkNRXUuzpNVsL28M Avr4EmxHU7I8+h4GaimZvf7y236ed9xZsMUrPmVlaijziNRlTD3n+0EfFJXSoHLzzx+x fxyhnPv5yj8CL0qVNHKPGpfFYYNGNoIY1PKyvPJVMpp0nT7Ny10HnEm/aIh49A+Y2F8y fZI0JJKFb1CgmvodKC9rSimHnaq2RkS+h0lOIEvFhwS6fSEYj62c83CXFInUuczSl7QK /tAQ== X-Gm-Message-State: AC+VfDwmPyCJD8BHlkM4AvK/cpTVXDLgj1M/Q+3tg3iDPGAeYMYoNz5z YsulySLXn29CjI7R1ZXZWN72fg== X-Google-Smtp-Source: ACHHUZ7olLMdzgJo49hRI+Brw+8ZbYH7IxOyZnrYIxdhWvtRY4fllkEJYDoAKqWowWyMCg9AG6Kdvg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-block@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