Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp3952562rwe; Mon, 17 Apr 2023 06:07:02 -0700 (PDT) X-Google-Smtp-Source: AKy350bbJdROHGbYFgelTMQSlgTb1mKxJuHXKadJ7Fi90fXg8biHlALjSe+RfA9ByuMo43ZmAuTP X-Received: by 2002:a17:903:2443:b0:1a6:bb7b:7a40 with SMTP id l3-20020a170903244300b001a6bb7b7a40mr8479476pls.64.1681736821776; Mon, 17 Apr 2023 06:07:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1681736821; cv=pass; d=google.com; s=arc-20160816; b=SZLOVa0SkLn397FaY4JW6TEjr5uMJT7wC1RBrIWYqEn3FH8MIyhzPnxyfZEEgS4Tfc 0lwbMXPD09xlhTTj4DbPdCO+dr0BiIVmhMoi/rczru5s2oEcV2+DfCsm6XE6hPSCXM9d 5HQVtkF0GH+yDPozENMc3vWZNjruDhC4gWzGDWalzsnhnMDEOEfj/pxRhCnXvB1TcQ+3 EfzGiE2eBLkqbbSwy8LBWqpKoVWniqk5+dGT6jJd6kPEoAS2d7AtNzqWXZfEWxs6fz3v JFd+ux5BDYLl04hjCATOnwMJT9ArFflblwdx6hH3K4dlAyfJs48Q2+wlo3ofvY0ivU1s QT5A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=szPw/8osvmIcdPOk8gasD/fEYrOR++nVJ3WBNv+WaTE=; b=npzh9g/rwb0ENlUR4ZX6KBMJQttsYRxE7eq7CNRUFAHomF6vxUJwKcMpBUCUcfbHYj GploINN3Ya/D45HsqPihMMqmIfb9XVw75Qg6J1pZF9QBBP8Bm6P8JDvBshJV1+/ajSGD ayaq9ks+IkphIYuTASm5fOw5ZI/wt21YojuiOof7rgYuYP7s+ibWWjRJJNyrFEJF8tir qn02P6Dd3ZeUe4TjCJiIQ0HdaVnIDK2eFvBeAKVD12YXCjZA53me/6krFCypHRciy/Vx tYbMw5EXRqMuMvG/ErJvmVTG37+ATSJ3I6cO4e2fhyYjfZ4+jJE+6JSI6n0ShKdmL7xg 2EXg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=FbCtql1U; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170903125000b001a649370ff3si12418544plh.401.2023.04.17.06.06.48; Mon, 17 Apr 2023 06:07:01 -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=@Nvidia.com header.s=selector2 header.b=FbCtql1U; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231486AbjDQNGF (ORCPT + 99 others); Mon, 17 Apr 2023 09:06:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231488AbjDQNFq (ORCPT ); Mon, 17 Apr 2023 09:05:46 -0400 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2085.outbound.protection.outlook.com [40.107.92.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2E2DC17A; Mon, 17 Apr 2023 06:02:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EhhyV4d13AZi9hBxZu55PrxB2nRjfTjwwFM4jXFO2s7GskpYPyEA6680kaea105jFyg4zukjzl6fGBnDNci7H7ALDslkYbfHajhQM+biKJiCBejL2hWZw30j9uR7bLrddn2FnS1UPTOKjkMlnKChzibUjscMrcjfxRG6sWGM4EPtT1G96xxXmzblF3MQL1R5uZrNeYhSPc5v2Ei0Cw5MSSWDRSLanc0BPFSIl7YMD7D6OyMJCE6y6uEBpuQjG8MGErguGJ3VJ8bYYLKeaXvhqpXF+P70OQ6KRdOZfpIFoKeXcGyaDGc4MHBeCdowmEXZSs/m/RbrQJ5bUkDCCCYnUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=szPw/8osvmIcdPOk8gasD/fEYrOR++nVJ3WBNv+WaTE=; b=PUwE8zjiqGIvhVg/xIplvvmtYTFI2S3r/2BHUbVKSjVsGkUph93hqFoHEVky/z3GiNI4aaW94YRvyyC9XlKAHDgQfA/kypBMx526eQynN6GT4SjYIkKe+0BXtnokhZWCV9VmGciwkx4yuy07keHIzpAWviwVMJBayHT3t4/+8CywB4O5SUtSOn3DPaadD8Spe7xLVJBxNMqfp5i+70HRmAhOGnX8yi0Im04L/9f6zykB4daDB48XvdcyPR9yC0eMbE6iXow6pAvkyfJDYZXka87r8G9AoDSM2UHMlZiH4pIaRkGsysRliF6pHFn25p0fOVpAe4sWUIjsqq1gOnSgiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=szPw/8osvmIcdPOk8gasD/fEYrOR++nVJ3WBNv+WaTE=; b=FbCtql1U0Tz25xhTlr02MClN9WmaspoAetytleGAzvtvxekTVTntd4ddSvf2HWhFrHFBe6JI1Q04XgBaQByoujnwTOlZHL75WPvbeiSx9YCHsamtNeCNHkoJxa+9M6anGAg9a1FMh6Aze5RHOv52XhYkfz0MImHpQv17txGHN2Z+uGAzatrY7BXAsVRKOCWA6PFV7/FiZTAWJBFwNeklx57bI9xAkTcjzkEtldYj64T/d3/93vTJ4hnV/EBTurN+frUNlNlkXOC3v258S4SUDoIsEjcRiNamKEVSyiUrocjSclhZwNcu2pcisIe69omdQugEswQYFnW5J5xgEnKgRg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by DM4PR12MB5390.namprd12.prod.outlook.com (2603:10b6:5:389::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.38; Mon, 17 Apr 2023 13:01:57 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::6045:ad97:10b7:62a2]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::6045:ad97:10b7:62a2%9]) with mapi id 15.20.6298.030; Mon, 17 Apr 2023 13:01:56 +0000 Date: Mon, 17 Apr 2023 10:01:54 -0300 From: Jason Gunthorpe To: Lorenzo Stoakes Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Matthew Wilcox , David Hildenbrand , x86@kernel.org, linux-sgx@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, kvm@vger.kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Jarkko Sakkinen , "H . Peter Anvin" , Xinhui Pan , David Airlie , Daniel Vetter , Dimitri Sivanich , Arnd Bergmann , Greg Kroah-Hartman , Paolo Bonzini Subject: Re: [PATCH 1/7] mm/gup: remove unused vmas parameter from get_user_pages() Message-ID: References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-ClientProxiedBy: YT4PR01CA0409.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:10b::14) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|DM4PR12MB5390:EE_ X-MS-Office365-Filtering-Correlation-Id: 94c63563-ad8f-47b0-91c4-08db3f43ec79 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yy3nF81DcVWFFMSf7CQ8qyBdIrTpdh52FBS6FUKtLREg0m1RrLYWezUJ2gjbhZEp31E4IK0jKyH5uXYHCCUT0x20ouE9TuG0gn8uTt6tCDHo1pZatXY/IfqfoErA7WC3N6KQTzoNnsySh2QDX3+zzceEBpoyVFsyxX9XcEuec5yOreVBfzzbTJFIESPfi9JKqMURQit+/uGf5j97zgw7hgKHLtwiAxA0/GNdErdwx/VtSq7qa5RHDLKEqJ1cULGSg85tARUiLwWx60bVFO5xnyB6M01sfnnN8nEaR0TmkB19vvr3PgiW81WoSJyIGuMqMqNPELmar7HOpYVeMFargf34np+YmcnUuUbHQkhOka7eyRLnE1EKOLcjDJTyqz75P/e1qAMgteUMl6pZh8GnsbsZ6UhPb1nqsfVmC2kDtfFnrLE9vzwxPDcgxYmMWxQUk5Ft5Tx+dBLOD4CR+Umvgix2wR3VaKtMdJl/zoK6shjcSy+uqHC3/heJ5kq9o7kG9SeBjuJ6ETC2mq8sT61tuOqot2pdL9ymkxgBTK13KygCGHLK0A6sT/eOTn5kRhZF X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(376002)(366004)(136003)(396003)(346002)(39860400002)(451199021)(2616005)(2906002)(26005)(6506007)(6512007)(86362001)(6486002)(8676002)(6916009)(54906003)(4326008)(478600001)(316002)(66556008)(66946007)(66476007)(7416002)(38100700002)(41300700001)(8936002)(5660300002)(36756003)(186003)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?IiiDLyEnosYn7kysTkoIkb6lsp5onG2a5s7RFiFSUQPU1f1H6ZHBOvckw3t1?= =?us-ascii?Q?ikBX48odIWovJx4ink9iun5tVcj3x3zt3TLw9ebfJRC3/MWcDEbj6E+o/elw?= =?us-ascii?Q?ioYUtAj2Z7VWCPqzvOmBBtjZPKqY8msbqqxngR5mFVYmAxJHh62ggoabeiyC?= =?us-ascii?Q?s9ixG56yv1xNGjPPAV3JTau2F2GQqqImxJGSaVI6LXpP9Q2yWdgUQR0HJMqH?= =?us-ascii?Q?u5zud9e7+pyZLeQlwelVLCYlFa9+Cey3IRkz5ybxuIvU7ndTeUrzYkRqxk4m?= =?us-ascii?Q?wBQp06tx7P/IPRcqLMVBYakSV9LFxNSstTAq3LShaKDjye8PMKAamtbuZaXd?= =?us-ascii?Q?wNretB1gWE5F7qDdmbr1XkdrdHXkmFCjWixytfbEccryzIdG8dBAIyDgdAJ6?= =?us-ascii?Q?rZzL+J/ft1T+B31fV7dGgyTy9cGZkBWi7VVgAWgk/OcL5IvGPiD8QgsN4Rw9?= =?us-ascii?Q?9Ee/htrHdR59zGp9N3rkjcBooM6tY6JKWDzGx3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xEJKOzY+u5zHE7zmpHUZVGhkKpi5D/mDWQWfYgFptZRAW?= =?us-ascii?Q?5heB7a3V8DzeWD8HLIOQTudw+Zec835GBeW7jf8jcQo32NO2H7IIilRbUxqj?= =?us-ascii?Q?shItB5MZcONmocJdvRiwmL31aNjrwJtROM52t/oWb0+6Izn2cs80XUStvqZi?= =?us-ascii?Q?fNf+rBK9CzK5rw5ULwzKD2ac+RQeP4Llm7x2XYTx?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94c63563-ad8f-47b0-91c4-08db3f43ec79 X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2023 13:01:56.8338 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0+0baHLvWHTdAip5gKuODZ98CnsDXYde+eVw3/kzGKTNb73pJjHUY0cRYBX8Htc0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5390 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no 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 Sat, Apr 15, 2023 at 12:27:13AM +0100, Lorenzo Stoakes wrote: > No invocation of get_user_pages() uses the vmas parameter, so remove > it. > > The GUP API is confusing and caveated. Recent changes have done much to > improve that, however there is more we can do. Exporting vmas is a prime > target as the caller has to be extremely careful to preclude their use > after the mmap_lock has expired or otherwise be left with dangling > pointers. > > Removing the vmas parameter focuses the GUP functions upon their primary > purpose - pinning (and outputting) pages as well as performing the actions > implied by the input flags. > > This is part of a patch series aiming to remove the vmas parameter > altogether. > > Signed-off-by: Lorenzo Stoakes > Suggested-by: Matthew Wilcox (Oracle) > --- > arch/x86/kernel/cpu/sgx/ioctl.c | 2 +- > drivers/gpu/drm/radeon/radeon_ttm.c | 2 +- > drivers/misc/sgi-gru/grufault.c | 2 +- > include/linux/mm.h | 3 +-- > mm/gup.c | 9 +++------ > mm/gup_test.c | 5 ++--- > virt/kvm/kvm_main.c | 4 ++-- > 7 files changed, 11 insertions(+), 16 deletions(-) Reviewed-by: Jason Gunthorpe Jason