lkml.org 
[lkml]   [2020]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v7 3/7] set_memory: allow set_direct_map_*_noflush() for multiple pages
On Tue, Oct 27, 2020 at 09:12:23AM +0100, David Hildenbrand wrote:
> On 26.10.20 20:01, Edgecombe, Rick P wrote:
> > On Mon, 2020-10-26 at 10:37 +0200, Mike Rapoport wrote:
> >> +++ b/arch/x86/mm/pat/set_memory.c
> >> @@ -2184,14 +2184,14 @@ static int __set_pages_np(struct page *page,
> >> int numpages)
> >> return __change_page_attr_set_clr(&cpa, 0);
> >> }
> >>
> >> -int set_direct_map_invalid_noflush(struct page *page)
> >> +int set_direct_map_invalid_noflush(struct page *page, int numpages)
> >> {
> >> - return __set_pages_np(page, 1);
> >> + return __set_pages_np(page, numpages);
> >> }
> >>
> >> -int set_direct_map_default_noflush(struct page *page)
> >> +int set_direct_map_default_noflush(struct page *page, int numpages)
> >> {
> >> - return __set_pages_p(page, 1);
> >> + return __set_pages_p(page, numpages);
> >> }
> >
> > Somewhat related to your other series, this could result in large NP
> > pages and trip up hibernate.
> >
>
> It feels somewhat desirable to disable hibernation once secretmem is
> enabled, right? Otherwise you'll be writing out your secrets to swap,
> where they will remain even after booting up again ...
>
> Skipping secretmem pages when hibernating is the wrong approach I guess ...

Completely agree.
I'll look into preventing hibernation from touching secretmem.

> --
> Thanks,
>
> David / dhildenb
>

--
Sincerely yours,
Mike.

\
 
 \ /
  Last update: 2020-10-27 10:50    [W:0.048 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site