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 B1F53C433EF for ; Mon, 22 Nov 2021 13:36:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239411AbhKVNjL (ORCPT ); Mon, 22 Nov 2021 08:39:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47971 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239275AbhKVNjB (ORCPT ); Mon, 22 Nov 2021 08:39:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1637588154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=602lNvVOZar2m+HSFbxBYiyDNXrGO+dVi/Ze/KZAj6g=; b=ZNDVdueQ4xrwWe5pXhJgvmseao91pgGi4k943MKsjUnPjFhJBevrarVBZ/Y/Ght0GUGvXk FmHMfDzufOBWB+sPHo6bKBVpkZ+lMUvw/XAK8svFtTb9U9RdnRxN1+r6M/Y5LPG17FVzoR 9xfdcuB2bWSuUu1Z0DjXDXXh6biDfrs= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-232-VaIYIV5kM5K5BsEkOWa7mw-1; Mon, 22 Nov 2021 08:35:53 -0500 X-MC-Unique: VaIYIV5kM5K5BsEkOWa7mw-1 Received: by mail-wm1-f69.google.com with SMTP id 187-20020a1c02c4000000b003335872db8dso6324554wmc.2 for ; Mon, 22 Nov 2021 05:35:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=602lNvVOZar2m+HSFbxBYiyDNXrGO+dVi/Ze/KZAj6g=; b=gFmPlXUghp6txxCiYFp08m59mUvVqVZQito8ENcJ8UDH8OwxFY03IiR1BsTl3Gfr5C bqUizhVm9xUbhkNTgBBPFqIxzrpBpm03bXLIzsWtxQbb99mXiWJiyXpdZHgF1KbOsMNl eIbcu3oeZj4HRlCjTDIMyd8qyRaEhGlCkEQte40LNseoq3ksrznJPB4k/DLkwyZ/wKBv uO9wrT4o5ldRGGeBENsvGwJLeeTxFQ8mIGfMLV8bfsNtmGh48a5ipTcF4V1T3uVmnS7G CVA4zs4XQ4D4wkI1bYRL6Nc/JtfjmYEsPX8cXj6wsFD6SiXZqfr3czF3/H8K94FxadSH t/Gw== X-Gm-Message-State: AOAM53341T1+wGA4wEdREuDZALUSn/+faq5nw08+oqXBV5Mjwxk/+m9y uoyiNlgLO8Oy8fY71JTONLujr8YDe5CMxg9aOtDwAhGm34YNRLcPf9Lp9XCftQISfagkdk5Qqwm rk0s1KZcCQL9diDiA10DDCwgA X-Received: by 2002:adf:f042:: with SMTP id t2mr39515200wro.180.1637588151974; Mon, 22 Nov 2021 05:35:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1uMKJXFglAoRaU5wdp0h6HMWbMcVgb35JuanaPUNLoA7JZ4ctjynARZIlt7KcqMq8Cl1Yqg== X-Received: by 2002:adf:f042:: with SMTP id t2mr39515155wro.180.1637588151703; Mon, 22 Nov 2021 05:35:51 -0800 (PST) Received: from [192.168.3.132] (p5b0c667b.dip0.t-ipconnect.de. [91.12.102.123]) by smtp.gmail.com with ESMTPSA id m34sm24540329wms.25.2021.11.22.05.35.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Nov 2021 05:35:51 -0800 (PST) Message-ID: <56c0dffc-5fc4-c337-3e85-a5c9ce619140@redhat.com> Date: Mon, 22 Nov 2021 14:35:49 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.0 Subject: Re: [RFC v2 PATCH 01/13] mm/shmem: Introduce F_SEAL_GUEST Content-Language: en-US To: Jason Gunthorpe Cc: Chao Peng , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, qemu-devel@nongnu.org, Paolo Bonzini , Jonathan Corbet , Sean Christopherson , 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 , Yu Zhang , "Kirill A . Shutemov" , luto@kernel.org, john.ji@intel.com, susie.li@intel.com, jun.nakajima@intel.com, dave.hansen@intel.com, ak@linux.intel.com References: <20211119134739.20218-1-chao.p.peng@linux.intel.com> <20211119134739.20218-2-chao.p.peng@linux.intel.com> <20211119151943.GH876299@ziepe.ca> <20211119160023.GI876299@ziepe.ca> <4efdccac-245f-eb1f-5b7f-c1044ff0103d@redhat.com> <20211122133145.GQ876299@ziepe.ca> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20211122133145.GQ876299@ziepe.ca> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 22.11.21 14:31, Jason Gunthorpe wrote: > On Mon, Nov 22, 2021 at 10:26:12AM +0100, David Hildenbrand wrote: > >> I do wonder if we want to support sharing such memfds between processes >> in all cases ... we most certainly don't want to be able to share >> encrypted memory between VMs (I heard that the kernel has to forbid >> that). It would make sense in the use case you describe, though. > > If there is a F_SEAL_XX that blocks every kind of new access, who > cares if userspace passes the FD around or not? I was imagining that you actually would want to do some kind of "change ownership". But yeah, the intended semantics and all use cases we have in mind are not fully clear to me yet. If it's really "no new access" (side note: is "access" the right word?) then sure, we can pass the fd around. -- Thanks, David / dhildenb