From: Johannes Weiner <hannes@cmpxchg.org>
To: Uma shankar <shankar.vk@gmail.com>
Cc: linux-mm@kvack.org
Subject: Re: accessing stack of non-current task
Date: Tue, 20 Apr 2010 15:43:22 +0200 [thread overview]
Message-ID: <20100420134322.GM20640@cmpxchg.org> (raw)
In-Reply-To: <y2t448a67a1004200538l45d46338vcd77b63a0e53d54e@mail.gmail.com>
On Tue, Apr 20, 2010 at 06:08:14PM +0530, Uma shankar wrote:
> Hi,
>
> Is it possible for the kernel to access the user-stack data of a
> task different from "current" ? ( This is needed for stack-dump as
> well as backtrace. )
Yes, have a look at __get_user_pages() in mm/memory.c.
> I thought the answer is "no". ( Kernel sees memory through the
> page-table of "current" )
That is correct when using virtual addresses and letting the MMU
do the page table lookup in the currently active page tables.
But if you have the task_struct of another process, you can easily
get to its vmas and page tables (task->mm) and walk them in software.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2010-04-20 13:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 12:38 accessing stack of non-current task Uma shankar
2010-04-20 13:43 ` Johannes Weiner [this message]
2010-04-20 14:00 ` Uma shankar
2010-04-20 17:16 ` Johannes Weiner
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=20100420134322.GM20640@cmpxchg.org \
--to=hannes@cmpxchg.org \
--cc=linux-mm@kvack.org \
--cc=shankar.vk@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.