[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <02806f62-8820-d5f9-779c-15c0e9cd0e85@kernel.org>
Date: Fri, 3 Sep 2021 12:15:51 -0700
From: Andy Lutomirski <luto@...nel.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>,
Sean Christopherson <seanjc@...gle.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Borislav Petkov <bp@...en8.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Joerg Roedel <jroedel@...e.de>,
Andi Kleen <ak@...ux.intel.com>,
David Rientjes <rientjes@...gle.com>,
Vlastimil Babka <vbabka@...e.cz>,
Tom Lendacky <thomas.lendacky@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Varad Gautam <varad.gautam@...e.com>,
Dario Faggioli <dfaggioli@...e.com>, x86@...nel.org,
linux-mm@...ck.org, linux-coco@...ts.linux.dev,
"Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
Kuppuswamy Sathyanarayanan
<sathyanarayanan.kuppuswamy@...ux.intel.com>,
David Hildenbrand <david@...hat.com>,
Dave Hansen <dave.hansen@...el.com>,
Yu Zhang <yu.c.zhang@...ux.intel.com>
Subject: Re: [RFC] KVM: mm: fd-based approach for supporting KVM guest private
memory
On 9/3/21 12:14 PM, Kirill A. Shutemov wrote:
> On Thu, Sep 02, 2021 at 08:33:31PM +0000, Sean Christopherson wrote:
>> Would requiring the size to be '0' at F_SEAL_GUEST time solve that problem?
>
> I guess. Maybe we would need a WRITE_ONCE() on set. I donno. I will look
> closer into locking next.
We can decisively eliminate this sort of failure by making the switch
happen at open time instead of after. For a memfd-like API, this would
be straightforward. For a filesystem, it would take a bit more thought.
Powered by blists - more mailing lists