diff options
author | Hugh Dickins <hughd@google.com> | 2013-04-23 11:20:35 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2013-04-25 13:15:37 +0100 |
commit | a0a9434dd50aac5971d63207ff1e25e69c9abdb3 (patch) | |
tree | 64af128498e7b5ff5944dcb43a1a499da583a906 /include/asm-generic/pgtable.h | |
parent | b361d61dc1aaa9bdac0a0995e443c12146d916fd (diff) | |
download | kernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.tar.gz kernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.tar.bz2 kernel_replicant_linux-a0a9434dd50aac5971d63207ff1e25e69c9abdb3.zip |
ARM: 7701/1: mm: Allow arch code to control the user page table ceiling
On architectures where a pgd entry may be shared between user and kernel
(e.g. ARM+LPAE), freeing page tables needs a ceiling other than 0. This
patch introduces a generic USER_PGTABLES_CEILING that arch code can
override. It is the responsibility of the arch code setting the ceiling
to ensure the complete freeing of the page tables (usually in
pgd_free()).
[catalin.marinas@arm.com: commit log; shift_arg_pages(), asm-generic/pgtables.h changes]
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org> # 3.3+
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-generic/pgtable.h')
-rw-r--r-- | include/asm-generic/pgtable.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/pgtable.h b/include/asm-generic/pgtable.h index bfd87685fc1f..a59ff51b0166 100644 --- a/include/asm-generic/pgtable.h +++ b/include/asm-generic/pgtable.h @@ -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, |