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 EEC64C54EAA for ; Mon, 23 Jan 2023 23:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232496AbjAWXDz (ORCPT ); Mon, 23 Jan 2023 18:03:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232159AbjAWXDk (ORCPT ); Mon, 23 Jan 2023 18:03:40 -0500 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34D8D2200F; Mon, 23 Jan 2023 15:03:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674514994; x=1706050994; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-id:content-transfer-encoding: mime-version; bh=xP/xrMfRyWQ2j2mzFtbVlXsuqlh/G3CHjRu4binF2Pg=; b=eHMKY7jkkxd4a80rF8fl4D3bu6pdHLDuWKE0kbKp541mN7kSn28Xta0L /wR/C1YeE4ZdRLm4wg2kZUnGEPkGXyBGZVjWTWRiP/iKvKv4A4TnhJFmk eejFxNEuNSMww3TRq+qMKgwjeuW6JdXtW3uy4h2vwxmCkodmD8aVTPLop OZXpGfVMjyKx+T5qUo8XLjGG/UzNRN2NOb5+7nLBv3vNZqa8/dLtt2C6B Qi1gIldHwj8v8+jFZChhZCljd4W7VsYVWXjVvZQTVfUR1uNKMKO8xpinT NEYe45CiASA+J1iA+XS5m4BwrtQrwHXtwWyFX36o3qffD12ViC9JeZhYd w==; X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="306534208" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="306534208" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jan 2023 15:01:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10599"; a="990647659" X-IronPort-AV: E=Sophos;i="5.97,240,1669104000"; d="scan'208";a="990647659" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga005.fm.intel.com with ESMTP; 23 Jan 2023 15:01:22 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 23 Jan 2023 15:01:21 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Mon, 23 Jan 2023 15:01:21 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 23 Jan 2023 15:01:21 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mJ4K8bqfcvdroO0LYxzhUKQjKcuIHhlnV+Z2dJe695qHihoQP9WPPDsHT17vP2mLfprDfvM9k0WAfLCcMOZG7VZe0tqfZGhowadqTfQQ+IzOTiZN3wUQOlSvZAql3i+3erlkKuRYgSY+z0VJXZVa4mTZEy1bzb/XPNRrGJ/nn2oDqZOhI53Gcce31QMzsgoK+2uoFeATbBjkkQOIVIPS+q+nNEiFMnhnPIYtyU/DMN5LsfKKSFSa4pE+QKmeiLPSnf/Eg56aL9GScbAAIh2vaz+BOkaTPjLgeSxFM68Npf+KRp5woXtQNcHZvMY3uXQVpPWGIJ+1p+e2DMxd38RKtg== 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=xP/xrMfRyWQ2j2mzFtbVlXsuqlh/G3CHjRu4binF2Pg=; b=HhqXs9nSqNY8mPlbi+dYchscj+3kyST0Pbk1uM0ku4RiikqteZ8G0YmvfL61Safx+G0Sjyrms1tlAv5frW3Elp8NxeUX7XL9qpZluwfBQ5iwJ0b6SdY3qX0ioPyAggqnxvtpFAqoiLy3KvZUgJEWbujSLaO9EI4YeeyS07hFh2xWMVsK9KP2SoHM0yfURMp3+q0SLvzVDchwnbszzZBaQfwUm40zVKP7BWX5kU6GztvT/v0ckBWcxfrom8YbEJCb+kGKMEREibTc39raMZs92PdMEwkqRaBLvUBjXZdNDjqm3C05h82UM1QTWf/U5JOSeyqWy/mzGcio6ZxKF5vIOg== 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 BL1PR11MB5978.namprd11.prod.outlook.com (2603:10b6:208:385::18) by DS0PR11MB6447.namprd11.prod.outlook.com (2603:10b6:8:c4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Mon, 23 Jan 2023 23:01:18 +0000 Received: from BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::3f19:b226:ebf1:b04a]) by BL1PR11MB5978.namprd11.prod.outlook.com ([fe80::3f19:b226:ebf1:b04a%8]) with mapi id 15.20.6002.033; Mon, 23 Jan 2023 23:01:18 +0000 From: "Huang, Kai" To: "chao.p.peng@linux.intel.com" , "vbabka@suse.cz" CC: "tglx@linutronix.de" , "linux-arch@vger.kernel.org" , "kvm@vger.kernel.org" , "jmattson@google.com" , "Lutomirski, Andy" , "ak@linux.intel.com" , "kirill.shutemov@linux.intel.com" , "Hocko, Michal" , "tabba@google.com" , "qemu-devel@nongnu.org" , "david@redhat.com" , "michael.roth@amd.com" , "corbet@lwn.net" , "linux-kernel@vger.kernel.org" , "dhildenb@redhat.com" , "bfields@fieldses.org" , "linux-fsdevel@vger.kernel.org" , "x86@kernel.org" , "bp@alien8.de" , "ddutile@redhat.com" , "rppt@kernel.org" , "shuah@kernel.org" , "vkuznets@redhat.com" , "naoya.horiguchi@nec.com" , "linux-api@vger.kernel.org" , "qperret@google.com" , "arnd@arndb.de" , "pbonzini@redhat.com" , "Annapurve, Vishal" , "mail@maciej.szmigiero.name" , "Christopherson,, Sean" , "wanpengli@tencent.com" , "yu.c.zhang@linux.intel.com" , "hughd@google.com" , "aarcange@redhat.com" , "mingo@redhat.com" , "hpa@zytor.com" , "Nakajima, Jun" , "jlayton@kernel.org" , "joro@8bytes.org" , "linux-mm@kvack.org" , "Wang, Wei W" , "steven.price@arm.com" , "linux-doc@vger.kernel.org" , "Hansen, Dave" , "akpm@linux-foundation.org" , "linmiaohe@huawei.com" Subject: Re: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory Thread-Topic: [PATCH v10 1/9] mm: Introduce memfd_restricted system call to create restricted user memory Thread-Index: AQHZBhXuq53UEB1w4kqtU0OzCkPOIq5sjtQAgAhi5ICAAA9XAIABemYAgAATugCAAefUgIAAt+UAgDMr74CAAJYsAA== Date: Mon, 23 Jan 2023 23:01:17 +0000 Message-ID: <0959c72ec635688f4b6c1b516815f79f52543b31.camel@intel.com> References: <20221202061347.1070246-1-chao.p.peng@linux.intel.com> <20221202061347.1070246-2-chao.p.peng@linux.intel.com> <5c6e2e516f19b0a030eae9bf073d555c57ca1f21.camel@intel.com> <20221219075313.GB1691829@chaop.bj.intel.com> <20221220072228.GA1724933@chaop.bj.intel.com> <126046ce506df070d57e6fe5ab9c92cdaf4cf9b7.camel@intel.com> <20221221133905.GA1766136@chaop.bj.intel.com> <010a330c-a4d5-9c1a-3212-f9107d1c5f4e@suse.cz> In-Reply-To: <010a330c-a4d5-9c1a-3212-f9107d1c5f4e@suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.46.3 (3.46.3-1.fc37) 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: BL1PR11MB5978:EE_|DS0PR11MB6447:EE_ x-ms-office365-filtering-correlation-id: a18e27ac-4d82-4bc1-38a9-08dafd95bc66 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: SxTYODu4nwk4j0tTgnmjA7bHbSoFNY3fE6L894EggV1SyuotAKF/Gcsk4oDPO1JLOI0uRgJq7iJzyDDlzFylJ76IggZ96XMl/4BP+Wg9wjyVFeBg72wu/R+IoakB93kHn40mp2U/T4t/4BJhCVJAMoTNeFtaJwB22KTMw5ywOpd24r8FikhuyR/iKEXRAk9xebRJ+NoD9WD5OHpGu6UjDU4oXO5TM4kvOYJ7nre+vjPusCDMAEOoej2gIeapyc2AyABRB6m1bpnOtImCDE+4gIZLys2m51kknZnN+3NVdrzDc8JaUFdQRgyciP5W9VP0j37QIV2ReNVsncifwmnOBymsULC3hzq8Mu3kAEELQHqXqMiRsiPVvhvyPSsr8ODDctlnrVH5bVns8icAAYUzwDQLgHmKbw+3pMVfGOmtzd0BbxGdQvgcGHcMNzOPxRm1CXUH9s1PiYjUTuETEubp+oghURbUXexQTZ8hY8VbcZhlIiWmtseSPQYrdgzG0ILrs9K5O09orWsN77r+pD61r1OjUcPdj48UUyPSNDY+APJ3vtmgzundkr6vuFPozUVcSp0g2avm7BRTPiuE5+EJmRwVXnhYs08B+hhAH+7YY5KSoMKogbK8UTT806ba5l1uhYwI5oBf0LKfw6B7yeXJ0fAHOgffXRj5u+gh5cbBao3aN5mHmC0tSG+X67K/BoY05YOnWRl7dedOfLs0LCR1oA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL1PR11MB5978.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(366004)(346002)(136003)(376002)(39860400002)(396003)(451199015)(122000001)(38100700002)(82960400001)(36756003)(38070700005)(86362001)(8676002)(76116006)(4326008)(66946007)(2616005)(54906003)(110136005)(26005)(316002)(6512007)(478600001)(53546011)(6506007)(71200400001)(186003)(6486002)(91956017)(7406005)(7416002)(8936002)(5660300002)(2906002)(66899015)(66446008)(66556008)(66476007)(64756008)(41300700001)(83380400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?Rm1nQmVWN1RFalo0SUhkdTZ5MXhOK3VQWitXRis2Zm5ISzlKZStjZXdFTzc1?= =?utf-8?B?QTBuanNRVUc3ekIzQ2t6STc2R1lQYXphWGZvQWVNRFhlTVYvOWZESTRCLzIx?= =?utf-8?B?Uk1vSWNYYW96MVc4KzY5SWs0M2daWlh5UWk4YWJsWHN4L2dRZGg3TG80bzlX?= =?utf-8?B?ODM1R1U1S1BXYzRyQk9rME5NS0ZFZ2NQdGFYTjZuVzlEVTNqSWlNaWtzWXVq?= =?utf-8?B?TFl5dUVjSTd3NVZDWWVSYmZQWmo1T0hST0I3eWRLOFU1cmtGSnlDQVpxNGlU?= =?utf-8?B?MVZNaWU5aUJLRlIySVYvWDJXY1UzRTNrRVdTdTh4a2JDUm93RHBIZkdHVjhK?= =?utf-8?B?czJ6MmRsaEY4REdYTGV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Q==?= Content-Type: text/plain; charset="utf-8" Content-ID: <7B85396C7BF4DD46BFC6728D6FA12D21@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BL1PR11MB5978.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a18e27ac-4d82-4bc1-38a9-08dafd95bc66 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Jan 2023 23:01:17.8804 (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: aUb3gyFMZYWu/6CKFevqe4ahNkNTkcreGb82cpN8KO1jGpmJe9xuTve3r3ppzr7JnB33xasqro5/c0t+WuCjqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR11MB6447 X-OriginatorOrg: intel.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org T24gTW9uLCAyMDIzLTAxLTIzIGF0IDE1OjAzICswMTAwLCBWbGFzdGltaWwgQmFia2Egd3JvdGU6 DQo+IE9uIDEyLzIyLzIyIDAxOjM3LCBIdWFuZywgS2FpIHdyb3RlOg0KPiA+ID4gPiBJIGFyZ3Vl IHRoYXQgdGhpcyBwYWdlIHBpbm5pbmcgKG9yIHBhZ2UgbWlncmF0aW9uIHByZXZlbnRpb24pIGlz IG5vdA0KPiA+ID4gPiB0aWVkIHRvIHdoZXJlIHRoZSBwYWdlIGNvbWVzIGZyb20sIGluc3RlYWQg cmVsYXRlZCB0byBob3cgdGhlIHBhZ2Ugd2lsbA0KPiA+ID4gPiBiZSB1c2VkLiBXaGV0aGVyIHRo ZSBwYWdlIGlzIHJlc3RyaWN0ZWRtZW0gYmFja2VkIG9yIEdVUCgpIGJhY2tlZCwgb25jZQ0KPiA+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