mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Hugh Dickins <hugh@veritas.com>, Andrew Morton <akpm@osdl.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] include all vmas with unbacked pages in ELF core dumps
Date: Thu, 21 Oct 2004 15:00:14 -0700	[thread overview]
Message-ID: <200410212200.i9LM0EWM023663@magilla.sf.frob.com> (raw)
In-Reply-To: Linus Torvalds's message of  Thursday, 21 October 2004 13:01:44 -0700 <Pine.LNX.4.58.0410211259400.2145@ppc970.osdl.org>

> 
> 
> 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?

I expect that has the same result as my patch (which tested vma->vm_file
instead of vma->vm_flags & VM_SHARED).  It produces the same good results
on the simple tests I've done (for glibc's RELRO segments).


Thanks,
Roland

      reply	other threads:[~2004-10-21 22:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20  8:22 Roland McGrath
2004-10-20 17:19 ` Linus Torvalds
2004-10-20 18:07   ` Roland McGrath
2004-10-21 19:05   ` Hugh Dickins
2004-10-21 20:01     ` Linus Torvalds
2004-10-21 22:00       ` Roland McGrath [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200410212200.i9LM0EWM023663@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®