ARM: add a vma entry for the user accessible vector page
commitec706dab290c486837d4a825870ab052bf200279
authorNicolas Pitre <nico@fluxnic.net>
Fri, 27 Aug 2010 03:10:50 +0000 (26 23:10 -0400)
committerNicolas Pitre <nicolas.pitre@linaro.org>
Sat, 2 Oct 2010 02:35:19 +0000 (1 22:35 -0400)
treeba9437df27ea98feedb7409559a18d7870220688
parent70c70d97809c3cdb8ff04f38ee3718c5385a2a4d
ARM: add a vma entry for the user accessible vector page

The kernel makes the high vector page visible to user space. This page
contains (amongst others) small code segments that can be executed in
user space.  Make this page visible through ptrace and /proc/<pid>/mem
in order to let gdb perform code parsing needed for proper unwinding.

For example, the ERESTART_RESTARTBLOCK handler actually has a stack
frame -- it returns to a PC value stored on the user's stack.   To
unwind after a "sleep" system call was interrupted twice, GDB would
have to recognize this situation and understand that stack frame
layout -- which it currently cannot do.

We could fix this by hard-coding addresses in the vector page range into
GDB, but that isn't really portable as not all of those addresses are
guaranteed to remain stable across kernel releases.  And having the gdb
process make an exception for this page and get  content from its own
address space for it looks strange, and it is not future proof either.

Being located above PAGE_OFFSET, this vma cannot be deleted by
user space code.

Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
arch/arm/include/asm/elf.h
arch/arm/include/asm/mmu_context.h
arch/arm/kernel/process.c