[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20201027094845.GJ1154158@kernel.org>
Date: Tue, 27 Oct 2020 11:48:45 +0200
From: Mike Rapoport <rppt@...nel.org>
To: David Hildenbrand <david@...hat.com>
Cc: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"tycho@...ho.ws" <tycho@...ho.ws>, "cl@...ux.com" <cl@...ux.com>,
"hpa@...or.com" <hpa@...or.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"will@...nel.org" <will@...nel.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"kirill@...temov.name" <kirill@...temov.name>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"rppt@...ux.ibm.com" <rppt@...ux.ibm.com>,
"linux-arch@...r.kernel.org" <linux-arch@...r.kernel.org>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"bp@...en8.de" <bp@...en8.de>,
"willy@...radead.org" <willy@...radead.org>,
"luto@...nel.org" <luto@...nel.org>,
"arnd@...db.de" <arnd@...db.de>,
"shuah@...nel.org" <shuah@...nel.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>,
"x86@...nel.org" <x86@...nel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"Reshetova, Elena" <elena.reshetova@...el.com>,
"palmer@...belt.com" <palmer@...belt.com>,
"mingo@...hat.com" <mingo@...hat.com>,
"mtk.manpages@...il.com" <mtk.manpages@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"paul.walmsley@...ive.com" <paul.walmsley@...ive.com>,
"mark.rutland@....com" <mark.rutland@....com>
Subject: Re: [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.
Powered by blists - more mailing lists