From: Roland McGrath Date: Fri, 26 Jan 2007 08:56:47 +0000 (-0800) Subject: [PATCH] Fix gate_vma.vm_flags X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b6558c4a2378af06f2beca6c8a3304e21d1cf135;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Cc: Ingo Molnar Cc: Paul Mackerras Cc: Benjamin Herrenschmidt Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index af227d26e104..5beb4b894c5a 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -2606,8 +2606,8 @@ static int __init gate_vma_init(void) gate_vma.vm_mm = NULL; gate_vma.vm_start = FIXADDR_USER_START; gate_vma.vm_end = FIXADDR_USER_END; - gate_vma.vm_page_prot = PAGE_READONLY; - gate_vma.vm_flags = 0; + gate_vma.vm_flags = VM_READ | VM_MAYREAD | VM_EXEC | VM_MAYEXEC; + gate_vma.vm_page_prot = __P101; return 0; } __initcall(gate_vma_init);