From: Roland McGrath Date: Fri, 26 Jan 2007 08:56:51 +0000 (-0800) Subject: [PATCH] powerpc vDSO: use VM_ALWAYSDUMP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3a0cfadb42e0a6dd221aa49232a65d2771063285;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] powerpc vDSO: use VM_ALWAYSDUMP This patch fixes core dumps to include the vDSO vma, which is left out now. Signed-off-by: Roland McGrath Cc: Ingo Molnar Cc: Paul Mackerras Acked-by: Benjamin Herrenschmidt Cc: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/powerpc/kernel/vdso.c b/arch/powerpc/kernel/vdso.c index a4b28c73bba0..ae0ede19879d 100644 --- a/arch/powerpc/kernel/vdso.c +++ b/arch/powerpc/kernel/vdso.c @@ -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;