[PATCH] x86_64 ia32 vDSO: define arch_vma_name
[sfrench/cifs-2.6.git] / arch / x86_64 / ia32 / syscall32.c
index 3e5ed20cba457c7f5e0ff149cab3ec124d20ef52..59f1fa1559151029d99f077d0861cd6bfd17392d 100644 (file)
@@ -59,6 +59,13 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
        vma->vm_end = VSYSCALL32_END;
        /* MAYWRITE to allow gdb to COW and set breakpoints */
        vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYEXEC|VM_MAYWRITE;
+       /*
+        * Make sure the vDSO gets into every core dump.
+        * Dumping its contents makes post-mortem fully interpretable later
+        * without matching up the same kernel and hardware config to see
+        * what PC values meant.
+        */
+       vma->vm_flags |= VM_ALWAYSDUMP;
        vma->vm_flags |= mm->def_flags;
        vma->vm_page_prot = protection_map[vma->vm_flags & 7];
        vma->vm_ops = &syscall32_vm_ops;
@@ -75,6 +82,14 @@ int syscall32_setup_pages(struct linux_binprm *bprm, int exstack)
        return 0;
 }
 
+const char *arch_vma_name(struct vm_area_struct *vma)
+{
+       if (vma->vm_start == VSYSCALL32_BASE &&
+           vma->vm_mm && vma->vm_mm->task_size == IA32_PAGE_OFFSET)
+               return "[vdso]";
+       return NULL;
+}
+
 static int __init init_syscall32(void)
 { 
        syscall32_page = (void *)get_zeroed_page(GFP_KERNEL);