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