]> Pileus Git - ~andy/linux/blobdiff - include/asm-generic/pgtable.h
ARM: 7701/1: mm: Allow arch code to control the user page table ceiling
[~andy/linux] / include / asm-generic / pgtable.h
index bfd87685fc1fd1fa32ea231c563205ed6f448a14..a59ff51b016695f54095e753cbfc2a5a6b684684 100644 (file)
@@ -7,6 +7,16 @@
 #include <linux/mm_types.h>
 #include <linux/bug.h>
 
+/*
+ * On almost all architectures and configurations, 0 can be used as the
+ * upper ceiling to free_pgtables(): on many architectures it has the same
+ * effect as using TASK_SIZE.  However, there is one configuration which
+ * must impose a more careful limit, to avoid freeing kernel pgtables.
+ */
+#ifndef USER_PGTABLES_CEILING
+#define USER_PGTABLES_CEILING  0UL
+#endif
+
 #ifndef __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
 extern int ptep_set_access_flags(struct vm_area_struct *vma,
                                 unsigned long address, pte_t *ptep,