From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Hildenbrand Subject: Re: [PATCH RFC] mm: add MAP_EXCLUSIVE to create exclusive user mappings Date: Tue, 29 Oct 2019 12:02:34 +0100 Message-ID: <085ed07e-e646-f7a4-0370-06f33a2a4e4a@redhat.com> References: <1572171452-7958-1-git-send-email-rppt@kernel.org> <1572171452-7958-2-git-send-email-rppt@kernel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: <1572171452-7958-2-git-send-email-rppt@kernel.org> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Mike Rapoport , linux-kernel@vger.kernel.org Cc: Alexey Dobriyan , Andrew Morton , Andy Lutomirski , Arnd Bergmann , Borislav Petkov , Dave Hansen , James Bottomley , Peter Zijlstra , Steven Rostedt , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , linux-api@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Mike Rapoport List-Id: linux-api@vger.kernel.org On 27.10.19 11:17, Mike Rapoport wrote: > From: Mike Rapoport >=20 > The mappings created with MAP_EXCLUSIVE are visible only in the context o= f > the owning process and can be used by applications to store secret > information that will not be visible not only to other processes but to t= he > kernel as well. >=20 > The pages in these mappings are removed from the kernel direct map and > marked with PG_user_exclusive flag. When the exclusive area is unmapped, > the pages are mapped back into the direct map. >=20 Just a thought, the kernel is still able to indirectly read the contents=20 of these pages by doing a kdump from kexec environment, right?. Also, I=20 wonder what would happen if you map such pages via /dev/mem into another=20 user space application and e.g., use them along with kvm [1]. [1] https://lwn.net/Articles/778240/ --=20 Thanks, David / dhildenb