|
|
Log in / Subscribe / Register

mm: add MAP_EXCLUSIVE to create exclusive user mappings

From:  Mike Rapoport <rppt-AT-kernel.org>
To:  linux-kernel-AT-vger.kernel.org
Subject:  [PATCH RFC] mm: add MAP_EXCLUSIVE to create exclusive user mappings
Date:  Sun, 27 Oct 2019 12:17:31 +0200
Message-ID:  <1572171452-7958-1-git-send-email-rppt@kernel.org>
Cc:  Alexey Dobriyan <adobriyan-AT-gmail.com>, Andrew Morton <akpm-AT-linux-foundation.org>, Andy Lutomirski <luto-AT-kernel.org>, Arnd Bergmann <arnd-AT-arndb.de>, Borislav Petkov <bp-AT-alien8.de>, Dave Hansen <dave.hansen-AT-linux.intel.com>, James Bottomley <jejb-AT-linux.ibm.com>, Mike Rapoport <rppt-AT-kernel.org>, Peter Zijlstra <peterz-AT-infradead.org>, Steven Rostedt <rostedt-AT-goodmis.org>, Thomas Gleixner <tglx-AT-linutronix.de>, Ingo Molnar <mingo-AT-redhat.com>, "H. Peter Anvin" <hpa-AT-zytor.com>, linux-api-AT-vger.kernel.org, linux-mm-AT-kvack.org, x86-AT-kernel.org, Mike Rapoport <rppt-AT-linux.ibm.com>
Archive-link:  Article

From: Mike Rapoport <rppt@linux.ibm.com>

Hi,

The patch below aims to allow applications to create mappins that have
pages visible only to the owning process. Such mappings could be used to
store secrets so that these secrets are not visible neither to other
processes nor to the kernel.

I've only tested the basic functionality, the changes should be verified
against THP/migration/compaction. Yet, I'd appreciate early feedback.

Mike Rapoport (1):
  mm: add MAP_EXCLUSIVE to create exclusive user mappings

 arch/x86/mm/fault.c                    | 14 ++++++++++
 fs/proc/task_mmu.c                     |  1 +
 include/linux/mm.h                     |  9 +++++++
 include/linux/page-flags.h             |  7 +++++
 include/linux/page_excl.h              | 49 ++++++++++++++++++++++++++++++++++
 include/trace/events/mmflags.h         |  9 ++++++-
 include/uapi/asm-generic/mman-common.h |  1 +
 kernel/fork.c                          |  3 ++-
 mm/Kconfig                             |  3 +++
 mm/gup.c                               |  8 ++++++
 mm/memory.c                            |  3 +++
 mm/mmap.c                              | 16 +++++++++++
 mm/page_alloc.c                        |  5 ++++
 13 files changed, 126 insertions(+), 2 deletions(-)
 create mode 100644 include/linux/page_excl.h

-- 
2.7.4



Copyright © 2019, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds