From owner-freebsd-sparc Sun Oct 27 10:53:17 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 675D137B401 for ; Sun, 27 Oct 2002 10:53:16 -0800 (PST) Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D1EC43E42 for ; Sun, 27 Oct 2002 10:53:15 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id g9RIrCx11167; Sun, 27 Oct 2002 10:53:12 -0800 (PST) (envelope-from jdp@vashon.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.12.5/8.12.5/Submit) id g9RIrC7u047147; Sun, 27 Oct 2002 10:53:12 -0800 (PST) (envelope-from jdp) Date: Sun, 27 Oct 2002 10:53:12 -0800 (PST) Message-Id: <200210271853.g9RIrC7u047147@vashon.polstra.com> To: sparc@freebsd.org From: John Polstra Cc: jake@locore.ca Subject: Re: Is the sparc64 stack segment executable? In-Reply-To: <20021027134726.J89245@locore.ca> References: <20021026224039.F89245@locore.ca> <200210271807.g9RI7dZC046984@vashon.polstra.com> <20021027134726.J89245@locore.ca> Organization: Polstra & Co., Seattle, WA Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org In article <20021027134726.J89245@locore.ca>, Jake Burkholder wrote: > Apparently, On Sun, Oct 27, 2002 at 10:07:39AM -0800, > John Polstra said words to the effect of; > > I suppose there must be some good reason why the stack isn't > > executable by default ... right? > > There are a couple reasons, I don't know how good they are. [...] Thanks for the detailed explanation! > The idea is that code that does this is in the minority so overall its > a win. The code that gcc generates can be made to do a sysctl or something > on startup, so the stack protections could be made a tunable to avoid > the system calls if its not confgured that way. > > Does modula-3 do this a lot? It's used in a few places in the compiler code, but I don't have a feel for how frequently those places are executed. I don't use nested functions much at all in my own code. They don't buy you much except the avoidance of a little parameter passing. > > Thanks, but there's no rush (see below). To fix it were you just > > going to copy the definition of TRANSFER_FROM_TRAMPOLINE from > > into ? > > Yes. This works, I've built a compiler that does this and your test > program runs. OK ... Actually, it would be nice if you could get panther upgraded with this fix. Then the necessary function (__enable_execute_stack) would be present in libgcc for the Modula-3 compiler to use. Thanks, John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message