um, pkeys: Add UML arch_*_access_permitted() methods
authorDave Hansen <dave.hansen@linux.intel.com>
Thu, 18 Feb 2016 18:35:57 +0000 (10:35 -0800)
committerIngo Molnar <mingo@kernel.org>
Thu, 18 Feb 2016 18:46:28 +0000 (19:46 +0100)
UML has a special mmu_context.h and needs updates whenever the generic one
is updated.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Dave Hansen <dave@sr71.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Richard Weinberger <richard@nod.at>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@kvack.org
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: user-mode-linux-user@lists.sourceforge.net
Link: http://lkml.kernel.org/r/20160218183557.AE1DB383@viggo.jf.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/um/include/asm/mmu_context.h

index 941527e507f76f417f83110407eec29f652e1a9d..1a60e1328e2fa1fa2fa7186d73615543a70d9ec2 100644 (file)
@@ -27,6 +27,20 @@ static inline void arch_bprm_mm_init(struct mm_struct *mm,
                                     struct vm_area_struct *vma)
 {
 }
+
+static inline bool arch_vma_access_permitted(struct vm_area_struct *vma,
+               bool write, bool execute, bool foreign)
+{
+       /* by default, allow everything */
+       return true;
+}
+
+static inline bool arch_pte_access_permitted(pte_t pte, bool write)
+{
+       /* by default, allow everything */
+       return true;
+}
+
 /*
  * end asm-generic/mm_hooks.h functions
  */