diff options
Diffstat (limited to 'arch/i386/kernel/sysenter.c')
-rw-r--r-- | arch/i386/kernel/sysenter.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c index 7de9117b5a3a..5da744204d10 100644 --- a/arch/i386/kernel/sysenter.c +++ b/arch/i386/kernel/sysenter.c | |||
@@ -79,11 +79,6 @@ int __init sysenter_setup(void) | |||
79 | #ifdef CONFIG_COMPAT_VDSO | 79 | #ifdef CONFIG_COMPAT_VDSO |
80 | __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); | 80 | __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_READONLY); |
81 | printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); | 81 | printk("Compat vDSO mapped to %08lx.\n", __fix_to_virt(FIX_VDSO)); |
82 | #else | ||
83 | /* | ||
84 | * In the non-compat case the ELF coredumping code needs the fixmap: | ||
85 | */ | ||
86 | __set_fixmap(FIX_VDSO, __pa(syscall_page), PAGE_KERNEL_RO); | ||
87 | #endif | 82 | #endif |
88 | 83 | ||
89 | if (!boot_cpu_has(X86_FEATURE_SEP)) { | 84 | if (!boot_cpu_has(X86_FEATURE_SEP)) { |
@@ -100,6 +95,7 @@ int __init sysenter_setup(void) | |||
100 | return 0; | 95 | return 0; |
101 | } | 96 | } |
102 | 97 | ||
98 | #ifndef CONFIG_COMPAT_VDSO | ||
103 | static struct page *syscall_nopage(struct vm_area_struct *vma, | 99 | static struct page *syscall_nopage(struct vm_area_struct *vma, |
104 | unsigned long adr, int *type) | 100 | unsigned long adr, int *type) |
105 | { | 101 | { |
@@ -146,6 +142,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack) | |||
146 | vma->vm_end = addr + PAGE_SIZE; | 142 | vma->vm_end = addr + PAGE_SIZE; |
147 | /* MAYWRITE to allow gdb to COW and set breakpoints */ | 143 | /* MAYWRITE to allow gdb to COW and set breakpoints */ |
148 | vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE; | 144 | vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE; |
145 | /* | ||
146 | * Make sure the vDSO gets into every core dump. | ||
147 | * Dumping its contents makes post-mortem fully interpretable later | ||
148 | * without matching up the same kernel and hardware config to see | ||
149 | * what PC values meant. | ||
150 | */ | ||
151 | vma->vm_flags |= VM_ALWAYSDUMP; | ||
149 | vma->vm_flags |= mm->def_flags; | 152 | vma->vm_flags |= mm->def_flags; |
150 | vma->vm_page_prot = protection_map[vma->vm_flags & 7]; | 153 | vma->vm_page_prot = protection_map[vma->vm_flags & 7]; |
151 | vma->vm_ops = &syscall_vm_ops; | 154 | vma->vm_ops = &syscall_vm_ops; |
@@ -187,3 +190,4 @@ int in_gate_area_no_task(unsigned long addr) | |||
187 | { | 190 | { |
188 | return 0; | 191 | return 0; |
189 | } | 192 | } |
193 | #endif | ||