Commit b6558c4a2378af06f2beca6c8a3304e21d1cf135
Committed by
Linus Torvalds
1 parent
a1f3bb9ae4
Exists in
master
and in
4 other branches
[PATCH] Fix gate_vma.vm_flags
This patch fixes the initialization of gate_vma.vm_flags and gate_vma.vm_page_prot to reflect reality. This makes the "[vdso]" line in /proc/PID/maps correctly show r-xp instead of ---p, when gate_vma is used (CONFIG_COMPAT_VDSO on i386). Signed-off-by: Roland McGrath <roland@redhat.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Paul Mackerras <paulus@samba.org> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
mm/memory.c
... | ... | @@ -2606,8 +2606,8 @@ |
2606 | 2606 | gate_vma.vm_mm = NULL; |
2607 | 2607 | gate_vma.vm_start = FIXADDR_USER_START; |
2608 | 2608 | gate_vma.vm_end = FIXADDR_USER_END; |
2609 | - gate_vma.vm_page_prot = PAGE_READONLY; | |
2610 | - gate_vma.vm_flags = 0; | |
2609 | + gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC; | |
2610 | + gate_vma.vm_page_prot = __P101; | |
2611 | 2611 | return 0; |
2612 | 2612 | } |
2613 | 2613 | __initcall(gate_vma_init); |