Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp800455rwb; Thu, 22 Sep 2022 06:37:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4hSLiIZlz08/aznn96d+yBDjC2Azw/bZM/fiL72WyLw3JQu0Mdg+QXeH6cBnBDWtpFDD20 X-Received: by 2002:a17:902:d3c6:b0:178:37e0:2e72 with SMTP id w6-20020a170902d3c600b0017837e02e72mr3505990plb.28.1663853829327; Thu, 22 Sep 2022 06:37:09 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663853829; cv=pass; d=google.com; s=arc-20160816; b=kO286lrd2CtJHY1ltHjma3Q/G2yIaIn5qUXa3uZZOexK69VsQ1sA/ex6GAbEWhUzUM ycpuJtT4ETxiKhwHx2rtDD3o3cnqd0ajemrvxNdhIfZCt1vS9YaXNKq2uTLQTXWxM1ne EfcukPJRU3hFJBFGZhSMJ+6oDyX0Pj4iZl4ytrROC797SfcMP+yikgWfmXnZeHlrR4P3 sy5jx87WU0EuGmTd7okkUGHh4ZLTicFXaR37Hi4mF9PlJxLK5sYzbgkk9vDjJZRQNU1T YAX30xxkUPG5L3IhoYRxRRfJYr9//wTyApz0+YYUx3FKgtZFRy8J/79geyxnZDAwROhE BfUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :dlp-version:dlp-reaction:dlp-product:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature; bh=/V/BpM80Wz3RlG2xGRwHzb4fAHR5QkpKI2TwgGYIN9k=; b=KsQr+hrCBn7uV5AVmwNEofaZTxLdU0yBadRy3YCPoNnsJudUwF2rrgg4IiAj/09akG JIJrBbz6LrN8TLH0M8riUXF6m1rRbXR/SISybdk7WhFGmwGbLCjKJY8D4SNCMA4YawHb C/kBcZPhazG/OW169FAuv5anKNNNXGM6W3FHuhWtIlPOnkRT83EL2QqyW5ec3HL5kHiQ 96NAsJMA60mwsJgpi+11l4L2pGgW20Q73uFHBhG4W9vH2CuO6xKm7YqvHTRKVUvJfFo/ uMr9SSUohp4AcMpAeOUTt9ieUlFAG0PQclKljVkzlenY9CKFnPcK3tPV+WUpZuafjJvA wCfw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=d0OJEuKr; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id oa4-20020a17090b1bc400b001fe30e92b36si683471pjb.153.2022.09.22.06.36.58; Thu, 22 Sep 2022 06:37:09 -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=@intel.com header.s=Intel header.b=d0OJEuKr; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.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=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231208AbiIVN1D (ORCPT + 99 others); Thu, 22 Sep 2022 09:27:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbiIVN1A (ORCPT ); Thu, 22 Sep 2022 09:27:00 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3AE35DE0C1; Thu, 22 Sep 2022 06:26:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663853219; x=1695389219; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=A1WiwNbsKdSmcDRyoGbP9I29qWo1Kpwcr563tFlwFVg=; b=d0OJEuKr1Nj9Iz5Msf3ake0GetuYBlXEtAG6oKF221MdLMiVPUpmM4gt wwY8EhjTV3XGGuTxPQz+0xUK2DXuA/ZpPVc6O6BoTWTmJGVdGOZJZ+aFj a97gzE93SHk1ZyVFQlNVL3MYZugXXJV7eGs8CJZShWerYUfP50kP0vdgy cXZp3AaOam5N/0zgbN5j7MnDS+eoSHbM6PP3Afuyuzjh14f0CCoWf1HZY cLgF1tNjRGPrPI48rn3Ozi9EHTZk3ItPzwcd3/fqS6UWgFvFLbNx04da/ V24GdGrwlK81AGYswnqlhVKEpRMDbGyQ5WqVpFHpXERBF8KtifLvtAXXw A==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="287375823" X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="287375823" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Sep 2022 06:26:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,335,1654585200"; d="scan'208";a="570960833" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 22 Sep 2022 06:26:57 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Thu, 22 Sep 2022 06:26:56 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Thu, 22 Sep 2022 06:26:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Thu, 22 Sep 2022 06:26:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U3yqmUEhF9Q30rBhgtVM67xZBMyelx+lXuALKE4Fi72w1JLx0/VkeCOFTUG2MFw545l7LSfmhPmNeHJmTwUFsE/2IKeCXbcf1jbeBoW/TJ5L72fLJ5diGKaN5rsi1HxwGMeEsI9QsKtPlj/oNetWkg2fbQxSN+k6MTeQOvJtBvmMYFPA1qPepVTkkUXW2Mz+iWf1L6DAsI9hluw1A08Z4I9SPpoMdEarIVhMJDVruHwglS9CgHBLBJbfBNJv3wb9V4Si/f7KEL9nXLProQ1iQy+LHH9Pc6F6bQpsFwtvMXCu1Ko3/dzgD7r7+0FRwJ/ZvP9OjvMffGCxvs2c26LTHQ== 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=/V/BpM80Wz3RlG2xGRwHzb4fAHR5QkpKI2TwgGYIN9k=; b=VctWu7z48TmuGXY7pTyq1sHjhi21HSObfklAkb+frGe4NxGvHD6ZwHx/s9nj3+y2EwyBoikN8SA0sCPNIgvaxOrsB1dAfNcaXU62uIEajAW+iqesNkMWF+cFIelSLyu8MRzZKK+CalemNEhibY+0MO7rQpU5SKG8f1WZifGNBO6BLb0JuIeVN9iavykL9kBH4PucYSTfuX2Kthrl28aQdBKBznNWUJRFsSEOA0fBDKSBOSUsPqlw/6dvk528hUjIIfMbgEsnDQzek7ah7iNVLWN9jrryoYH8xmkTfMGln7x3ixdTfqr5oZp5/araBZsMiESJZf5ziU0RaZ13BBkarw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DS0PR11MB6373.namprd11.prod.outlook.com (2603:10b6:8:cb::20) by SN7PR11MB6797.namprd11.prod.outlook.com (2603:10b6:806:263::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.18; Thu, 22 Sep 2022 13:26:47 +0000 Received: from DS0PR11MB6373.namprd11.prod.outlook.com ([fe80::817a:fd68:f270:1ea0]) by DS0PR11MB6373.namprd11.prod.outlook.com ([fe80::817a:fd68:f270:1ea0%7]) with mapi id 15.20.5654.016; Thu, 22 Sep 2022 13:26:47 +0000 From: "Wang, Wei W" To: Chao Peng , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-mm@kvack.org" , "linux-fsdevel@vger.kernel.org" , "linux-api@vger.kernel.org" , "linux-doc@vger.kernel.org" , "qemu-devel@nongnu.org" CC: Paolo Bonzini , Jonathan Corbet , "Christopherson,, Sean" , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "x86@kernel.org" , "H . Peter Anvin" , Hugh Dickins , Jeff Layton , "J . Bruce Fields" , "Andrew Morton" , Shuah Khan , "Mike Rapoport" , Steven Price , "Maciej S . Szmigiero" , Vlastimil Babka , Vishal Annapurve , Yu Zhang , "Kirill A . Shutemov" , "Lutomirski, Andy" , "Nakajima, Jun" , "Hansen, Dave" , "ak@linux.intel.com" , "david@redhat.com" , "aarcange@redhat.com" , "ddutile@redhat.com" , "dhildenb@redhat.com" , Quentin Perret , Michael Roth , "Hocko, Michal" , Muchun Song Subject: RE: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd Thread-Topic: [PATCH v8 1/8] mm/memfd: Introduce userspace inaccessible memfd Thread-Index: AQHYyRA+DGITW09wp06ZhgFK30MXVK3mRmjw Date: Thu, 22 Sep 2022 13:26:47 +0000 Message-ID: References: <20220915142913.2213336-1-chao.p.peng@linux.intel.com> <20220915142913.2213336-2-chao.p.peng@linux.intel.com> In-Reply-To: <20220915142913.2213336-2-chao.p.peng@linux.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS0PR11MB6373:EE_|SN7PR11MB6797:EE_ x-ms-office365-filtering-correlation-id: 2b8b7c74-24b5-41c6-847a-08da9c9e199d x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NhzEwMN5COxOHRfOeGkCdKBevsmeRgcD7O1QrWr5bdmTvpnXfgo+ubTNzNvCoeB8aMYGFeVWNFRzvjIXPo2PQYpSmYpZ4fYsQdoRUmDA3K/ZoWWQ6+0fWPT0d662FuOVMBrwQmAQuVtmI8C/6wvKQKSG13qwztkIniszXKyZd1F1iii06q76mheWSDsdPnz6dGvQHKJ9LMydO7CaydTVe7Y8UEVD+Vtr/iBJvC2f8xd0sknScUsWEJcTjkHQby+nWMw92dScWzqLTikNmvNJhItE+ZMFrA2G6qLgW882R6kchIEN01IifT5bISIFdyOW4s90uxKkA5CrOV6uR5CAtVQl5A7MtT/lINtMHnIJ1/rc0anhPMVEdYTGxw0gzCkdtOm2w1dlkh7B/v2CMyut1jVeAo5qCBZzrDBUHqC9AQd12iDq0anTaqvv+8cxZQbx8/1uC15P0MRuGKtIbSkUTXEytdSfSxy9oGjYHoDitsnpa9fHQMB+/8hmazpTVZMeC6u6hHZFgjxeDIUAg5gThB7BcVRwWD1tsGxtHutj2KAVVFAO7/iZo38EhJTnGqDAqD3CJzDuea8GOoEzfo1GUN+phQLw5o2veBjiRxWk+dUj/6+BP+xrEg/O7HWg2yvE9LrfKnytwTz1ULYMPZzHRmz9q6xl/+alh7wcCj40tMTBxyfpZnm5+w6y7KtJqjkP97G4RwaoDZOs3zYvbc2mNqvbrgufPdzZUOa9WWfEFSYpJRkKjau9+ew3JHV+eFK8BnQtjipuWL4VggXfgHOZOA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS0PR11MB6373.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(39860400002)(346002)(376002)(396003)(366004)(136003)(451199015)(83380400001)(122000001)(5660300002)(8676002)(64756008)(66446008)(66476007)(66556008)(66946007)(76116006)(316002)(4326008)(41300700001)(2906002)(8936002)(7406005)(7416002)(4744005)(478600001)(9686003)(52536014)(55016003)(7696005)(26005)(53546011)(6506007)(186003)(54906003)(110136005)(71200400001)(86362001)(33656002)(38100700002)(38070700005)(82960400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?58l9LnLH13RvsLPyTi5ybfZN/nsHEy9xWnbf+HfclZpSsa/V24E0MnThuvAZ?= =?us-ascii?Q?Hyw255rBOagDttJMMH22wfpqTx4R8CkPg05ZhnwNdHfedFyB6i8JhhDcU2m9?= =?us-ascii?Q?U1dgqm4phIL2ofrR4sFfYt0Jt67AcKyYSfRlL7sJDxE7h4rcFf2DjgwPl0Fw?= =?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pfHbrEtOWv3Mlup4jEcgaxqEYKE+vsmZ?= =?us-ascii?Q?evv2bepWOMqI255F5pmRqgwqdNLgy3JLsSXTHYLYnxb0QJTPbGOEp/RIRepk?= =?us-ascii?Q?Z/vaZB8tug8R4t9NAsgUwRT8iN1pF4Hh3jLeqhKnrqR+ng0asvbfXADHUv/Z?= =?us-ascii?Q?OxCr+7sGTVOHIRKVsl2jwgrQcQizD1+mOray53N8TamI2jXbkTy4xc3PHL2X?= =?us-ascii?Q?M25my5JKBY4prK8tAG+jVxu4Hln7mzgAqoNbjZTsk4Mlvsbp3DdcjckI59Pz?= =?us-ascii?Q?1ll6JLpX01weEHQcWYeoz7Yeaacquu3JALXA2DH/KrxjHeIDKyVoLTkP06Ex?= =?us-ascii?Q?SssHOxWOCAV03i7Yqmiq86/5hnV+9D752fC67AR13sIqAhu7Ty4BiC9UiEu2?= =?us-ascii?Q?A7Q3ZmK0rgYwSCo+FrgNar76++rl7NbHUiBHXr3rjBmCQtfuEm9s3wpyYR3d?= =?us-ascii?Q?9Wr5aUpcGLPvl6POxlmgq3TSxcIhTXM9xZxG6ciB7LmfKkVXEH14dQpZ8CrA?= =?us-ascii?Q?i8nnSVYWoQOhBnEc8wTIZRT/G/RMeOuYAgfcAl+m?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB6373.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2b8b7c74-24b5-41c6-847a-08da9c9e199d X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2022 13:26:47.4397 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: zJ1bT3jrDR5NTf6cEgGfc0Ajzx9DHFyx4rO3H+oGMILcO56mnBJjDLrOkC5IQrwAZAe8nhAzCfuFTe8c+Q2gSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR11MB6797 X-OriginatorOrg: intel.com X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 Thursday, September 15, 2022 10:29 PM, Chao Peng wrote: > +int inaccessible_get_pfn(struct file *file, pgoff_t offset, pfn_t *pfn, > + int *order) Better to remove "order" from this interface? Some callers only need to get pfn, and no need to bother with defining and inputting something unused. For callers who need the "order", can easily get it via thp_order(pfn_to_page(pfn)) on their own.