[PATCH] powerpc vDSO: use VM_ALWAYSDUMP
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / vdso.c
index c913ad5cad2918e3daebe1251de37a18292f67c9..ae0ede19879ded35d9dba71b760e887aff75e020 100644 (file)
@@ -264,7 +264,7 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
 
 
        /* Allocate a VMA structure and fill it up */
-       vma = kmem_cache_zalloc(vm_area_cachep, SLAB_KERNEL);
+       vma = kmem_cache_zalloc(vm_area_cachep, GFP_KERNEL);
        if (vma == NULL) {
                rc = -ENOMEM;
                goto fail_mmapsem;
@@ -284,6 +284,13 @@ int arch_setup_additional_pages(struct linux_binprm *bprm,
         * pages though
         */
        vma->vm_flags = VM_READ|VM_EXEC|VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC;
+       /*
+        * 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 & 0x7];
        vma->vm_ops = &vdso_vmops;