From: Mike Rapoport <rppt@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"catalin.marinas@arm.com" <catalin.marinas@arm.com>,
"dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"hpa@zytor.com" <hpa@zytor.com>, "cl@linux.com" <cl@linux.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"Reshetova, Elena" <elena.reshetova@intel.com>,
"linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"tycho@tycho.ws" <tycho@tycho.ws>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"will@kernel.org" <will@kernel.org>,
"x86@kernel.org" <x86@kernel.org>,
"willy@infradead.org" <willy@infradead.org>,
"rppt@linux.ibm.com" <rppt@linux.ibm.com>,
"mingo@redhat.com" <mingo@redhat.com>,
"mtk.manpages@gmail.com" <mtk.manpages@gmail.com>,
"arnd@arndb.de" <arnd@arndb.de>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"bp@alien8.de" <bp@alien8.de>,
"viro@zeniv.linux.org.uk" <viro@zeniv.linux.org.uk>,
"luto@kernel.org" <luto@kernel.org>,
"paul.walmsley@sifive.com" <paul.walmsley@sifive.com>,
"kirill@shutemov.name" <kirill@shutemov.name>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-api@vger.kernel.org" <linux-api@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"Edgecombe, Rick P" <rick.p.edgecombe@intel.com>
Subject: Re: [PATCH v7 3/7] set_memory: allow set_direct_map_*_noflush() for multiple pages
Date: Tue, 27 Oct 2020 11:48:45 +0200 [thread overview]
Message-ID: <20201027094845.GJ1154158@kernel.org> (raw)
In-Reply-To: <9202c4c1-9f1f-175f-0a85-fc8c30bc5e3b@redhat.com>
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.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2020-10-27 9:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 8:37 [PATCH v7 0/7] mm: introduce memfd_secret system call to create "secret" memory areas Mike Rapoport
2020-10-26 8:37 ` [PATCH v7 1/7] mm: add definition of PMD_PAGE_ORDER Mike Rapoport
2020-10-27 8:26 ` David Hildenbrand
2020-10-26 8:37 ` [PATCH v7 2/7] mmap: make mlock_future_check() global Mike Rapoport
2020-10-26 8:37 ` [PATCH v7 3/7] set_memory: allow set_direct_map_*_noflush() for multiple pages Mike Rapoport
2020-10-26 19:01 ` Edgecombe, Rick P
2020-10-27 8:12 ` David Hildenbrand
2020-10-27 9:48 ` Mike Rapoport [this message]
2020-10-26 8:37 ` [PATCH v7 4/7] mm: introduce memfd_secret system call to create "secret" memory areas Mike Rapoport
2020-10-26 8:37 ` [PATCH v7 5/7] arch, mm: wire up memfd_secret system call were relevant Mike Rapoport
2020-10-26 8:37 ` [PATCH v7 6/7] mm: secretmem: use PMD-size pages to amortize direct map fragmentation Mike Rapoport
2020-10-26 8:37 ` [PATCH v7 7/7] secretmem: test: add basic selftest for memfd_secret(2) Mike Rapoport
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201027094845.GJ1154158@kernel.org \
--to=rppt@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=cl@linux.com \
--cc=dan.j.williams@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=david@redhat.com \
--cc=elena.reshetova@intel.com \
--cc=hpa@zytor.com \
--cc=jejb@linux.ibm.com \
--cc=kirill@shutemov.name \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-nvdimm@lists.01.org \
--cc=linux-riscv@lists.infradead.org \
--cc=luto@kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=mtk.manpages@gmail.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=rppt@linux.ibm.com \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=tycho@tycho.ws \
--cc=viro@zeniv.linux.org.uk \
--cc=will@kernel.org \
--cc=willy@infradead.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).