From: Al Viro <viro@ZenIV.linux.org.uk>
To: t cheney <cdmalord@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 1/1] x86: Add process memory layout to coredump file
Date: Wed, 14 Dec 2011 21:16:52 +0000 [thread overview]
Message-ID: <20111214211652.GO2203@ZenIV.linux.org.uk> (raw)
In-Reply-To: <CAE04G=Bu4WnU9SYU9u3-ap6OrBEjWONK8TA8bYBy5OSCCzzDqg@mail.gmail.com>
On Sat, Dec 10, 2011 at 10:37:02PM +0800, t cheney wrote:
> This patch just add memory layout(same as /proc/pid/maps) to
> coredump file. The layout is appended to corenote segment with
> flag NT_MAPS=7.
> + len = sprintf(buf, "%08lx-%08lx %c%c%c%c %08llx %02x:%02x %lu",
> + start,
> + end,
> + flags & VM_READ ? 'r' : '-',
> + flags & VM_WRITE ? 'w' : '-',
> + flags & VM_EXEC ? 'x' : '-',
> + flags & VM_MAYSHARE ? 's' : 'p',
> + pgoff,
> + MAJOR(dev), MINOR(dev), ino);
Device numbers may be wider than 16 bits.
> + p = d_path(&vma->vm_file->f_path, s, maps_size-1);
What if somebody renames the file (or, better yet, its parent directory)
between two calls of that thing?
next prev parent reply other threads:[~2011-12-14 21:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 14:37 [PATCH 1/1] x86: Add process memory layout to coredump file t cheney
2011-12-10 20:02 ` Andi Kleen
2011-12-11 12:44 ` t cheney
2011-12-11 13:19 ` t cheney
2011-12-13 12:37 ` Fwd: " t cheney
[not found] ` <CAE04G=D_OzrDRUOj-iVPJY5sNTLMfUKAeikks8TWMYOWvh6HeA@mail.gmail.com>
[not found] ` <CAE04G=D_OzrDRUOj-iVPJY5sNTLMfUKAeikks8TWMYOWvh6HeA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-12-12 21:03 ` Jan Kratochvil
2011-12-18 10:10 ` t cheney
2011-12-13 12:36 ` Fwd: " t cheney
2011-12-14 21:16 ` Al Viro [this message]
2011-12-18 12:37 ` t cheney
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=20111214211652.GO2203@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=cdmalord@gmail.com \
--cc=linux-fsdevel@vger.kernel.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).