[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d466e1f13ff615332fe1f513f6c1d763db28bd9a.camel@intel.com>
Date: Tue, 29 Sep 2020 04:58:44 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "rppt@...nel.org" <rppt@...nel.org>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>
CC: "tycho@...ho.ws" <tycho@...ho.ws>,
"david@...hat.com" <david@...hat.com>,
"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>,
"idan.yaniv@....com" <idan.yaniv@....com>,
"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 v6 3/6] mm: introduce memfd_secret system call to create
"secret" memory areas
On Thu, 2020-09-24 at 16:29 +0300, Mike Rapoport wrote:
> Introduce "memfd_secret" system call with the ability to create
> memory
> areas visible only in the context of the owning process and not
> mapped not
> only to other processes but in the kernel page tables as well.
>
> The user will create a file descriptor using the memfd_secret()
> system call
> where flags supplied as a parameter to this system call will define
> the
> desired protection mode for the memory associated with that file
> descriptor.
>
> Currently there are two protection modes:
>
> * exclusive - the memory area is unmapped from the kernel direct map
> and it
> is present only in the page tables of the owning mm.
Seems like there were some concerns raised around direct map
efficiency, but in case you are going to rework this...how does this
memory work for the existing kernel functionality that does things like
this?
get_user_pages(, &page);
ptr = kmap(page);
foo = *ptr;
Not sure if I'm missing something, but I think apps could cause the
kernel to access a not-present page and oops.
Powered by blists - more mailing lists