lkml.org 
[lkml]   [2018]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC, PATCH 21/22] x86/mm: Introduce page_keyid() and page_encrypted()
On Mon, Mar 05, 2018 at 09:08:53AM -0800, Dave Hansen wrote:
> On 03/05/2018 08:26 AM, Kirill A. Shutemov wrote:
> > +static inline bool page_encrypted(struct page *page)
> > +{
> > + /* All pages with non-zero KeyID are encrypted */
> > + return page_keyid(page) != 0;
> > +}
>
> Is this true? I thought there was a KEYID_NO_ENCRYPT "Do not encrypt
> memory when this KeyID is in use." Is that really only limited to key 0.

Well, it depends on what we mean by "encrypted". For memory management
pruposes we care if the page is encrypted with KeyID different from
default one. All pages with non-default KeyID threated the same by memory
management.

So far we don't have users for the interface. We may reconsider
the meaning once we get users.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2018-03-06 09:58    [W:0.100 / U:0.840 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site