linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] um, pkeys: give UML an arch_vma_access_permitted()
@ 2016-02-18 18:35 Dave Hansen
  2016-02-18 20:22 ` [tip:mm/pkeys] um, pkeys: Add UML arch_*_access_permitted() methods tip-bot for Dave Hansen
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Hansen @ 2016-02-18 18:35 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, x86, Dave Hansen, dave.hansen


From: Dave Hansen <dave.hansen@linux.intel.com>

UML has a special mmu_context.h and needs updates whenever the generic one
is updated.  The original pkeys patches missed this.  This fixes it up.

Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
---

 b/arch/um/include/asm/mmu_context.h |   14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff -puN arch/um/include/asm/mmu_context.h~pkeys-fix-um-arch_vma_access_permitted arch/um/include/asm/mmu_context.h
--- a/arch/um/include/asm/mmu_context.h~pkeys-fix-um-arch_vma_access_permitted	2016-02-18 10:19:17.675287570 -0800
+++ b/arch/um/include/asm/mmu_context.h	2016-02-18 10:20:09.214627363 -0800
@@ -27,6 +27,20 @@ static inline void arch_bprm_mm_init(str
 				     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
  */
_

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-18 20:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 18:35 [PATCH] um, pkeys: give UML an arch_vma_access_permitted() Dave Hansen
2016-02-18 20:22 ` [tip:mm/pkeys] um, pkeys: Add UML arch_*_access_permitted() methods tip-bot for Dave Hansen

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).