linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "David S. Miller" <davem@davemloft.net>
To: dan@debian.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: fs/binfmt_elf.c:maydump()
Date: Thu, 06 Apr 2006 15:35:18 -0700 (PDT)	[thread overview]
Message-ID: <20060406.153518.60508780.davem@davemloft.net> (raw)
In-Reply-To: <20060406221519.GA5453@nevyn.them.org>

From: Daniel Jacobowitz <dan@debian.org>
Date: Thu, 6 Apr 2006 18:15:19 -0400

> On Thu, Apr 06, 2006 at 02:03:57PM -0700, David S. Miller wrote:
> > Yes, this means we might hit the core dump limits quicker but we
> > shouldn't be doing anything which makes less debugging information
> > than necessary available.  Software development is hard enough as
> > it is right? :)
> 
> > -	/* If it hasn't been written to, don't write it out */
> > -	if (!vma->anon_vma)
> > -		return 0;
> > -
> 
> Isn't this, um, a little more extreme than what you really want?
> What goes into coredumps with this patch applied?  I bet it includes
> the complete text segments of every executable and shared library
> involved in the link.  You're going to need those if you want to debug,
> anyway.

With this patch applied, yes, it includes the complete text segments of
every executable and shared library mapped into the program which is
dumping core.

What's a good check to avoid shared libraries and executables?  And do
we really want to avoid including them?  What if a new version of one
of the shared libraries is installed on the system after the core file
is generated?  Wouldn't you want the complete original image so that
the program could be debugged accurately in the face of such changes?

Anyways a possible check would be if the object was mapped with
execute permission, so a test on VM_EXEC being set in vma->vm_flags.

But like the comment above maydump() seems to suggest, I'm of the
opinion that we should include as much as possible into the core
file image.

  reply	other threads:[~2006-04-06 22:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06 21:03 fs/binfmt_elf.c:maydump() David S. Miller
2006-04-06 22:15 ` fs/binfmt_elf.c:maydump() Daniel Jacobowitz
2006-04-06 22:35   ` David S. Miller [this message]
2006-04-07  5:18     ` fs/binfmt_elf.c:maydump() David S. Miller
2006-04-07 18:02       ` fs/binfmt_elf.c:maydump() Daniel Jacobowitz
2006-04-07 20:27         ` fs/binfmt_elf.c:maydump() David S. Miller
2006-04-10 13:01           ` fs/binfmt_elf.c:maydump() Daniel Jacobowitz
2007-01-03  2:02       ` Contents of core dumps (was: Re: fs/binfmt_elf.c:maydump()) Daniel Jacobowitz
2007-01-03  4:57         ` Contents of core dumps David Miller
2007-01-03 18:13           ` Daniel Jacobowitz

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=20060406.153518.60508780.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dan@debian.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).