From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail144.messagelabs.com (mail144.messagelabs.com [216.82.254.51]) by kanga.kvack.org (Postfix) with ESMTP id DC6686B01F1 for ; Tue, 20 Apr 2010 09:43:26 -0400 (EDT) Date: Tue, 20 Apr 2010 15:43:22 +0200 From: Johannes Weiner Subject: Re: accessing stack of non-current task Message-ID: <20100420134322.GM20640@cmpxchg.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: owner-linux-mm@kvack.org To: Uma shankar Cc: linux-mm@kvack.org List-ID: 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: email@kvack.org