From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753872AbZDCH4O (ORCPT ); Fri, 3 Apr 2009 03:56:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751893AbZDCHz5 (ORCPT ); Fri, 3 Apr 2009 03:55:57 -0400 Received: from www84.your-server.de ([213.133.104.84]:44884 "EHLO www84.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbZDCHz5 (ORCPT ); Fri, 3 Apr 2009 03:55:57 -0400 Subject: Re: Detailed Stack Information Patch [2/3] From: Stefani Seibold To: Mikael Pettersson Cc: Ingo Molnar , Andrew Morton , linux-kernel , linux-mm , Peter Zijlstra , Joerg Engel In-Reply-To: <18901.48028.862826.66492@pilspetsen.it.uu.se> References: <1238511507.364.62.camel@matrix> <20090401193639.GB12316@elte.hu> <1238707547.3882.24.camel@matrix> <18901.48028.862826.66492@pilspetsen.it.uu.se> Content-Type: text/plain Date: Fri, 03 Apr 2009 10:01:08 +0200 Message-Id: <1238745668.8735.4.camel@matrix> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: stefani@seibold.net Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Freitag, den 03.04.2009, 09:32 +0200 schrieb Mikael Pettersson: > Stefani Seibold writes: > > I think a user space daemon will be the a good way if the /proc/*/maps > > or /proc/*/stack will provide the following information: > > > > - start address of the stack > > - current address of the stack pointer > > - highest used address in the stack > > You're assuming > 1. a thread has exactly one stack > 2. the stack is a single unbroken area > 3. the kernel knows the location of this area > > None of these assumptions are necessarily valid, esp. in > the presence of virtualizers, managed runtimes, or mixed > interpreted/JIT language implementations. We are talking about the kernel view. And from this point a thread has only one stack and it is a single mapped continuous area. There are only one exception and that is the sigaltstack().