Re: [PATCH] include all vmas with unbacked pages in ELF core dumps

From: Linus Torvalds
Date: Thu Oct 21 2004 - 15:26:59 EST




On Thu, 21 Oct 2004, Hugh Dickins wrote:
>
> if (!vma->anon_vma)
> return 0;

Ok. So the end result ends up pretty simple:

static int maydump(struct vm_area_struct *vma)
{
/* Do not dump I/O mapped devices, shared memory, or special mappings */
if (vma->vm_flags & (VM_IO | VM_SHARED | VM_RESERVED))
return 0;

/* If it hasn't been written to, don't write it out */
if (!vma->anon_vma)
return 0;

return 1;
}

does this make everybody happy?

Do the core-files blow up a lot from this? Or does it miss some case?

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/