[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190617092755.GA3419@hirez.programming.kicks-ass.net>
Date: Mon, 17 Jun 2019 11:27:55 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: "Kirill A. Shutemov" <kirill@...temov.name>
Cc: "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, Borislav Petkov <bp@...en8.de>,
Andy Lutomirski <luto@...capital.net>,
David Howells <dhowells@...hat.com>,
Kees Cook <keescook@...omium.org>,
Dave Hansen <dave.hansen@...el.com>,
Kai Huang <kai.huang@...ux.intel.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Alison Schofield <alison.schofield@...el.com>,
linux-mm@...ck.org, kvm@...r.kernel.org, keyrings@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH, RFC 18/62] x86/mm: Implement syncing per-KeyID direct
mappings
On Sat, Jun 15, 2019 at 01:43:09AM +0300, Kirill A. Shutemov wrote:
> On Fri, Jun 14, 2019 at 11:51:32AM +0200, Peter Zijlstra wrote:
> > On Wed, May 08, 2019 at 05:43:38PM +0300, Kirill A. Shutemov wrote:
> > > For MKTME we use per-KeyID direct mappings. This allows kernel to have
> > > access to encrypted memory.
> > >
> > > sync_direct_mapping() sync per-KeyID direct mappings with a canonical
> > > one -- KeyID-0.
> > >
> > > The function tracks changes in the canonical mapping:
> > > - creating or removing chunks of the translation tree;
> > > - changes in mapping flags (i.e. protection bits);
> > > - splitting huge page mapping into a page table;
> > > - replacing page table with a huge page mapping;
> > >
> > > The function need to be called on every change to the direct mapping:
> > > hotplug, hotremove, changes in permissions bits, etc.
> >
> > And yet I don't see anything in pageattr.c.
>
> You're right. I've hooked up the sync in the wrong place.
> >
> > Also, this seems like an expensive scheme; if you know where the changes
> > where, a more fine-grained update would be faster.
>
> Do we have any hot enough pageattr users that makes it crucial?
>
> I'll look into this anyway.
The graphics people would be the most agressive users of this I'd think.
They're the ones that yelled when I broke it last ;-)
Powered by blists - more mailing lists