Re: accessing stack of non-current task

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx> 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@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]