From: David Howells <dhowells@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: dhowells@redhat.com, uclinux-dev@uclinux.org,
David McCullough <davidm@snapgear.com>,
Greg Ungerer <gerg@uclinux.org>, Paul Mundt <lethal@linux-sh.org>,
uclinux-dist-devel@blackfin.uclinux.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] NOMMU: add [stack] label to per-process maps output
Date: Wed, 16 Dec 2009 08:54:22 +0000 [thread overview]
Message-ID: <22709.1260953662@redhat.com> (raw)
In-Reply-To: <1260921350-6539-1-git-send-email-vapier@gentoo.org>
Mike Frysinger <vapier@gentoo.org> wrote:
> it'd be cool if the global /proc/maps could display something like
> [stack/<pid>], but i can't quite divine how to get a mm_struct out
> of a vm_region without having to walk the entire process list.
Tricky. vm_regions can be shared between multiple mm_structs, although in the
case of the stack, they're probably not. Furthermore, there's no interface to
mmap() to say the region you're allocating belongs to a particular PID (and
with userspace created threads, you have to create the stack _before_ calling
clone()).
That said, you could add a 'creator pid' to the vm_region. This could be set
firstly by mmap() to current->pid, and then overridden by clone() for the
stack VMA. It would be approximate, but probably a good approximation. You
probably don't actually need a back pointer, just an integer PID.
David
next prev parent reply other threads:[~2009-12-16 8:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-15 23:55 [PATCH] NOMMU: add [stack] label to per-process maps output Mike Frysinger
2009-12-16 8:54 ` David Howells [this message]
2009-12-16 16:59 ` David Howells
2009-12-16 19:36 ` [uClinux-dev] " Mike Frysinger
2009-12-17 22:49 ` Mike Frysinger
2009-12-17 23:27 ` David Howells
2009-12-21 14:35 ` [PATCH v2] " Mike Frysinger
2009-12-22 15:58 ` David Howells
2010-05-24 5:35 ` Mike Frysinger
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=22709.1260953662@redhat.com \
--to=dhowells@redhat.com \
--cc=davidm@snapgear.com \
--cc=gerg@uclinux.org \
--cc=lethal@linux-sh.org \
--cc=linux-kernel@vger.kernel.org \
--cc=uclinux-dev@uclinux.org \
--cc=uclinux-dist-devel@blackfin.uclinux.org \
--cc=vapier@gentoo.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).