Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263792AbUCXRt0 (ORCPT ); Wed, 24 Mar 2004 12:49:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263795AbUCXRt0 (ORCPT ); Wed, 24 Mar 2004 12:49:26 -0500 Received: from ns.suse.de ([195.135.220.2]:39838 "EHLO Cantor.suse.de") by vger.kernel.org with ESMTP id S263792AbUCXRtZ (ORCPT ); Wed, 24 Mar 2004 12:49:25 -0500 To: Jakub Jelinek Cc: linux-kernel@vger.kernel.org Subject: Re: Non-Exec stack patches References: <20040324002149.GT4677@tpkurt.garloff.de.suse.lists.linux.kernel> <16480.55450.730214.175997@napali.hpl.hp.com.suse.lists.linux.kernel> <4060E24C.9000507@redhat.com.suse.lists.linux.kernel> <16480.59229.808025.231875@napali.hpl.hp.com.suse.lists.linux.kernel> <20040324070020.GI31589@devserv.devel.redhat.com.suse.lists.linux.kernel> <16481.13780.673796.20976@napali.hpl.hp.com.suse.lists.linux.kernel> <20040324072840.GK31589@devserv.devel.redhat.com.suse.lists.linux.kernel> <16481.15493.591464.867776@napali.hpl.hp.com.suse.lists.linux.kernel> <4061B764.5070008@BitWagon.com.suse.lists.linux.kernel> <16481.49534.124281.434663@napali.hpl.hp.com.suse.lists.linux.kernel> <20040324172454.GP31589@devserv.devel.redhat.com.suse.lists.linux.kernel> From: Andi Kleen Date: 24 Mar 2004 18:49:21 +0100 In-Reply-To: <20040324172454.GP31589@devserv.devel.redhat.com.suse.lists.linux.kernel> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 748 Lines: 14 Jakub Jelinek writes: > > Nope. Think about multithreaded apps. Furthermore, getting the exact > extents of the particular stack is difficult to find for applications, > but e.g. the threading library has to know such things. It's actually not that difficult. You just have to read /proc/self/maps and check for the mapping of your current stack pointer. For the main stack GROWSDOWN will inherit the x or nx on growing down. And cache a flag about this in a TLS variable. -Andi - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/