Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1306682rwl; Wed, 5 Apr 2023 15:11:19 -0700 (PDT) X-Google-Smtp-Source: AKy350YdXh9bgHcUyjwXIfJqvcsU/ZTIEZT/TALsfL5hlVfRZ9txgEkWOvZoRzWhEnKC8jNPQvj9 X-Received: by 2002:a17:906:6d88:b0:931:9cd2:c214 with SMTP id h8-20020a1709066d8800b009319cd2c214mr4303768ejt.66.1680732679291; Wed, 05 Apr 2023 15:11:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680732679; cv=none; d=google.com; s=arc-20160816; b=ysxWy5w4Bk8/VtrLlTJHDUQhLAlz6K8rnz/awwf3iruPBuM/+uoFVen31x0YzK8nkr FBsUpgCWqivL6Sy+uxSPLcs5hYsqWZqvFLG7lcSXjL0FYaBcnpmBx9XDQQ72se3TLPJy llfjuKb3VcWN6v5Jlb3Sc/2vjzWH3Oel21KiuQ2gc2TCWDTgTe+xhUe+oKK8sdEWBzry GSidQH1Ec47TLdPALbnLK5Xc1DX+dOYO4KbHik3ARIU/p8uM9kYPwrstuh4aJSnkrLM9 7jmHpNc29cni4fJo47cHpHEW+uFp691I3o6qZi2VwVgGD8ZyE4LffW3PLUz/37H50965 m9ZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:from:subject :message-id:mime-version:in-reply-to:date:dkim-signature; bh=IH39ss5xMXY6Gj7ki1Ay0DF53+qf6gIKCW6Lh2mhinY=; b=ALkMc8/SKcCpMKTKV88aB/uaI7h8jF5dVsp87CowKRPMm2D0N4s3eHGgT85eIIMviw GshGZfvJ0U5zIvvX36eCLUpoKH2HcGzkkyMDsaNCm6sN5At2GiQWSGsrZnDsNdRXFzWA cNo+FBSjRUg1R35OfhXJ/Am35CQ4WuXSwnemJ/KAP5yToJ9gr5FAXSPAYoE7Tymkxry1 bYAAcvXvyD2Q5exzZbkLeXi+KYM5AQx5UBXMcSeqNRS6GKbRmVWkNTK8lgZdC6Jy2weF QTFUq0RY4HmhXoT+mP2fhta5D9GBW1xFc2jp2her6DGtGZfNMwc6ARCF7XJbIkjdigd0 mMvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=fl4rR6Nj; 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=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m3-20020a170906848300b0092fc502b03dsi12382732ejx.500.2023.04.05.15.10.52; Wed, 05 Apr 2023 15:11:19 -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=@google.com header.s=20210112 header.b=fl4rR6Nj; 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=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229958AbjDEV6w (ORCPT + 99 others); Wed, 5 Apr 2023 17:58:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233742AbjDEV6u (ORCPT ); Wed, 5 Apr 2023 17:58:50 -0400 Received: from mail-pj1-x1049.google.com (mail-pj1-x1049.google.com [IPv6:2607:f8b0:4864:20::1049]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F33C57D85 for ; Wed, 5 Apr 2023 14:58:45 -0700 (PDT) Received: by mail-pj1-x1049.google.com with SMTP id pm10-20020a17090b3c4a00b0023ff02aced2so2417084pjb.1 for ; Wed, 05 Apr 2023 14:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1680731925; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:in-reply-to:date:from:to:cc:subject:date:message-id :reply-to; bh=IH39ss5xMXY6Gj7ki1Ay0DF53+qf6gIKCW6Lh2mhinY=; b=fl4rR6NjYHEvN26i5qIhp/k/+mnyLHXHU7i1ans1u8NvI4HueaIFWpA3AVY+kWpqlY +stxTYRLVOmZ3M7bgZqspbaxmUXimB5S0QWj6YfAyYP336LLt9g1tFm1ja7OeRIX4A4M Ag46kp5ZRpZeMtE7ri9m5g2Ar4T/7pM0T6dQNfwrmWF3ypbHoXNRhe1Mwrgm6OxGHY+f LtBhG7LwbIq8LrNHCL+4OT7px9kggF9jxd9G4PrhjjcFH3IasVJtbBJ+ValbH7Ijk0oq s5lInx/h+L/py4DQ0XPdO31iZmD9LXoL2zZCKSAQmZfXM2E7Dpzk6aiv7vJOfqCT79l3 2NYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680731925; h=content-transfer-encoding:cc:to:from:subject:message-id :mime-version:in-reply-to:date:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=IH39ss5xMXY6Gj7ki1Ay0DF53+qf6gIKCW6Lh2mhinY=; b=f7GLl5K42xFm8NhESVMoczlMxGkM72VjyKabquUVNQcTQmv5ocJgi6MDOHlJG9Z3t7 sSPAecAhQf9wpJk4eNvsRtjIzxxmlBXCUdV7FHj3/Dt6BQ2t6UGfQBzArf6FfWlAgob7 5tWziMn5+w/lBO3F3uhHpvKr27tOqql5EFa4rEQ74glcVmSP3LNf6ubW6lsWI57zdjzt XaR7YoHBY9TC4D4PNic8OwCXHcEIwMfEkuXOWFB+OkhjhuJPQ+OCRzniZY97Gna/D2j8 ai6SqziIulS6d0YC5C2ElqNG5yXb7sktnnarrFYZE6t9jZQTJEDn2i7btKWpR/hDt8gH u0QQ== X-Gm-Message-State: AAQBX9d99rPVuGAoj/C3rBV9JpTlyos/6F9e/rwVWftBKl2Er+i/9ASa UYpVmpsXi/3EndQVnx3xNGSNF9X/9gfxJKH2gQ== X-Received: from ackerleytng-cloudtop.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1f5f]) (user=ackerleytng job=sendgmr) by 2002:a17:902:8c82:b0:1a1:c523:a9bd with SMTP id t2-20020a1709028c8200b001a1c523a9bdmr3229562plo.0.1680731925439; Wed, 05 Apr 2023 14:58:45 -0700 (PDT) Date: Wed, 05 Apr 2023 21:58:44 +0000 In-Reply-To: <20230404-engraved-rumble-d871e0403f3b@brauner> (message from Christian Brauner on Tue, 4 Apr 2023 16:58:34 +0200) Mime-Version: 1.0 Message-ID: Subject: Re: [RFC PATCH v3 1/2] mm: restrictedmem: Allow userspace to specify mount for memfd_restricted From: Ackerley Tng To: Christian Brauner Cc: kvm@vger.kernel.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, qemu-devel@nongnu.org, aarcange@redhat.com, ak@linux.intel.com, akpm@linux-foundation.org, arnd@arndb.de, bfields@fieldses.org, bp@alien8.de, chao.p.peng@linux.intel.com, corbet@lwn.net, dave.hansen@intel.com, david@redhat.com, ddutile@redhat.com, dhildenb@redhat.com, hpa@zytor.com, hughd@google.com, jlayton@kernel.org, jmattson@google.com, joro@8bytes.org, jun.nakajima@intel.com, kirill.shutemov@linux.intel.com, linmiaohe@huawei.com, luto@kernel.org, mail@maciej.szmigiero.name, mhocko@suse.com, michael.roth@amd.com, mingo@redhat.com, naoya.horiguchi@nec.com, pbonzini@redhat.com, qperret@google.com, rppt@kernel.org, seanjc@google.com, shuah@kernel.org, steven.price@arm.com, tabba@google.com, tglx@linutronix.de, vannapurve@google.com, vbabka@suse.cz, vkuznets@redhat.com, wanpengli@tencent.com, wei.w.wang@intel.com, x86@kernel.org, yu.c.zhang@linux.intel.com Content-Type: text/plain; charset="UTF-8"; format=flowed; delsp=yes Content-Transfer-Encoding: base64 X-Spam-Status: No, score=-7.7 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 DQpUaGFua3MgYWdhaW4gZm9yIHlvdXIgcmV2aWV3IQ0KDQpDaHJpc3RpYW4gQnJhdW5lciA8YnJh dW5lckBrZXJuZWwub3JnPiB3cml0ZXM6DQo+IE9uIFR1ZSwgQXByIDA0LCAyMDIzIGF0IDAzOjUz OjEzUE0gKzAyMDAsIENocmlzdGlhbiBCcmF1bmVyIHdyb3RlOg0KPj4gT24gRnJpLCBNYXIgMzEs IDIwMjMgYXQgMTE6NTA6MzlQTSArMDAwMCwgQWNrZXJsZXkgVG5nIHdyb3RlOg0KPj4gPg0KPj4g PiAuLi4NCj4+ID4NCj4+ID4gLVNZU0NBTExfREVGSU5FMShtZW1mZF9yZXN0cmljdGVkLCB1bnNp Z25lZCBpbnQsIGZsYWdzKQ0KPj4gPiArc3RhdGljIGludCByZXN0cmljdGVkbWVtX2NyZWF0ZShz dHJ1Y3QgdmZzbW91bnQgKm1vdW50KQ0KPj4gPiAgew0KPj4gPiAgCXN0cnVjdCBmaWxlICpmaWxl LCAqcmVzdHJpY3RlZF9maWxlOw0KPj4gPiAgCWludCBmZCwgZXJyOw0KPj4gPg0KPj4gPiAtCWlm IChmbGFncykNCj4+ID4gLQkJcmV0dXJuIC1FSU5WQUw7DQo+PiA+IC0NCj4+ID4gIAlmZCA9IG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