Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S263799AbUCXRy0 (ORCPT ); Wed, 24 Mar 2004 12:54:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S263800AbUCXRy0 (ORCPT ); Wed, 24 Mar 2004 12:54:26 -0500 Received: from mx1.redhat.com ([66.187.233.31]:58786 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S263799AbUCXRyW (ORCPT ); Wed, 24 Mar 2004 12:54:22 -0500 Date: Wed, 24 Mar 2004 12:54:02 -0500 From: Jakub Jelinek To: Andi Kleen Cc: linux-kernel@vger.kernel.org Subject: Re: Non-Exec stack patches Message-ID: <20040324175402.GQ31589@devserv.devel.redhat.com> Reply-To: Jakub Jelinek References: <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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 671 Lines: 16 On Wed, Mar 24, 2004 at 06:49:21PM +0100, Andi Kleen wrote: > 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. That assumes there are always gaps around thread stacks, which doesn't have to be true. You could make executable some other mapping as well easily. Jakub - 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/