From owner-freebsd-arch@FreeBSD.ORG Wed Aug 27 20:13:02 2008 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 429291065681 for ; Wed, 27 Aug 2008 20:13:02 +0000 (UTC) (envelope-from peter@wemm.org) Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.168]) by mx1.freebsd.org (Postfix) with ESMTP id 264108FC19 for ; Wed, 27 Aug 2008 20:13:02 +0000 (UTC) (envelope-from peter@wemm.org) Received: by wf-out-1314.google.com with SMTP id 24so28296wfg.7 for ; Wed, 27 Aug 2008 13:13:01 -0700 (PDT) Received: by 10.142.222.4 with SMTP id u4mr124530wfg.250.1219866300107; Wed, 27 Aug 2008 12:45:00 -0700 (PDT) Received: by 10.142.76.14 with HTTP; Wed, 27 Aug 2008 12:45:00 -0700 (PDT) Message-ID: Date: Wed, 27 Aug 2008 12:45:00 -0700 From: "Peter Wemm" To: "Robert Watson" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c1674c90808231713x47e42de5oa9fc2f2f244d2e74@mail.gmail.com> <20080826074943.GB85357@duncan.reilly.home> <20080826162807.GF16977@elvis.mu.org> <20080827011949.GA98242@duncan.reilly.home> Cc: freebsd-arch@freebsd.org, Alfred Perlstein , Ivan Voras , Matthew Macy Subject: Re: FreeBSD and DEP aka "NX bit"? X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2008 20:13:02 -0000 On Wed, Aug 27, 2008 at 2:10 AM, Robert Watson wrote: > On Wed, 27 Aug 2008, Andrew Reilly wrote: > >> On Tue, Aug 26, 2008 at 09:28:07AM -0700, Alfred Perlstein wrote: >>> >>> * Andrew Reilly [080826 00:51] >>> wrote: >>>> >>>> I've been using 7-STABLE on amd64 for a long time, and haven't noticed >>>> any problems with Java or SBCL lisp or PLT-scheme, all of which use JIT code >>>> generation (but probably neither use jemalloc?) >>> >>> mprotect(2)? >> >> Fair enough. Good to know that it's actually tweaking the NX permissions, >> I guess. The man page seems a little vague about when it might succeed, and >> what effect it might have... > > We're behind on the not-mapping-writable stuff, so for better (and worse) > quite a few such things in application have been faulted in by other > operating systems already. That doesn't mean there won't be issues, but > does have the redeeming aspect that things should be less bumpy for us going > forward. Hopefully we can start making that progress a bit more quickly... I recall seeing config.h code chunks to turn sections of the stack on/off for execution on (I think) sparc64. It might have been for netbsd. If my memory serves correctly, libgcc grew code to do mprotect(), and the gcc code generator would call it as appropriate when it needed to do its magic. I think this was for an older version of gcc though. -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV "All of this is for nothing if we don't go to the stars" - JMS/B5 "If Java had true garbage collection, most programs would delete themselves upon execution." -- Robert Sewell