aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/process.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/process.c')
-rw-r--r--arch/arm/kernel/process.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index 401e38be1f78..66ac9c926200 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -458,3 +458,24 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
458 unsigned long range_end = mm->brk + 0x02000000; 458 unsigned long range_end = mm->brk + 0x02000000;
459 return randomize_range(mm->brk, range_end, 0) ? : mm->brk; 459 return randomize_range(mm->brk, range_end, 0) ? : mm->brk;
460} 460}
461
462/*
463 * The vectors page is always readable from user space for the
464 * atomic helpers and the signal restart code. Let's declare a mapping
465 * for it so it is visible through ptrace and /proc/<pid>/mem.
466 */
467
468int vectors_user_mapping(void)
469{
470 struct mm_struct *mm = current->mm;
471 return install_special_mapping(mm, 0xffff0000, PAGE_SIZE,
472 VM_READ | VM_EXEC |
473 VM_MAYREAD | VM_MAYEXEC |
474 VM_ALWAYSDUMP | VM_RESERVED,
475 NULL);
476}
477
478const char *arch_vma_name(struct vm_area_struct *vma)
479{
480 return (vma->vm_start == 0xffff0000) ? "[vectors]" : NULL;
481}