aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorHugh Dickins2013-04-29 17:07:44 -0500
committerGreg Kroah-Hartman2013-05-07 22:08:20 -0500
commit5d3fcda885ad9344278101d9a584aae74f7b351e (patch)
treed561e5ba1f672ef84172a19a11507215dfd974f3 /fs
parentf7a07f4a01c40b9e47a3c9afc285092bf7b52913 (diff)
downloadkernel-omap-5d3fcda885ad9344278101d9a584aae74f7b351e.tar.gz
kernel-omap-5d3fcda885ad9344278101d9a584aae74f7b351e.tar.xz
kernel-omap-5d3fcda885ad9344278101d9a584aae74f7b351e.zip
mm: allow arch code to control the user page table ceiling
commit 6ee8630e02be6dd89926ca0fbc21af68b23dc087 upstream. 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: Russell King <linux@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 20df02c1cc70..547eaaaeb89c 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -613,7 +613,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
613 * when the old and new regions overlap clear from new_end. 613 * when the old and new regions overlap clear from new_end.
614 */ 614 */
615 free_pgd_range(&tlb, new_end, old_end, new_end, 615 free_pgd_range(&tlb, new_end, old_end, new_end,
616 vma->vm_next ? vma->vm_next->vm_start : 0); 616 vma->vm_next ? vma->vm_next->vm_start : USER_PGTABLES_CEILING);
617 } else { 617 } else {
618 /* 618 /*
619 * otherwise, clean from old_start; this is done to not touch 619 * otherwise, clean from old_start; this is done to not touch
@@ -622,7 +622,7 @@ static int shift_arg_pages(struct vm_area_struct *vma, unsigned long shift)
622 * for the others its just a little faster. 622 * for the others its just a little faster.
623 */ 623 */
624 free_pgd_range(&tlb, old_start, old_end, new_end, 624 free_pgd_range(&tlb, old_start, old_end, new_end,
625 vma->vm_next ? vma->vm_next->vm_start : 0); 625 vma->vm_next ? vma->vm_next->vm_start : USER_PGTABLES_CEILING);
626 } 626 }
627 tlb_finish_mmu(&tlb, new_end, old_end); 627 tlb_finish_mmu(&tlb, new_end, old_end);
628 628