All of lore.kernel.org
 help / color / mirror / Atom feed
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 19:16:37 +0200	[thread overview]
Message-ID: <20100420171637.GN20640@cmpxchg.org> (raw)
In-Reply-To: <s2i448a67a1004200700n4242a936tbaf4df2b4c710ab2@mail.gmail.com>

On Tue, Apr 20, 2010 at 07:30:15PM +0530, Uma shankar wrote:
> On Tue, Apr 20, 2010 at 7:13 PM, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > 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.
> >
> 
> Yes,  I understand this.
> 
> But  have a look  at  "void show_stack(struct task_struct *tsk,
> unsigned long *sp)  "  in traps.c (  arch specific  ).
> 
> Is there a implicit assumption that  "tsk"  and "current"  are threads
> sharing same  "mm_strct"  ?

No, this is dumping the _kernel stack_ of a process, not the user stack.

The mm_struct does not matter.

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

      reply	other threads:[~2010-04-20 17:16 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
2010-04-20 14:00   ` Uma shankar
2010-04-20 17:16     ` Johannes Weiner [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=20100420171637.GN20640@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.