From owner-freebsd-hackers@FreeBSD.ORG Sat Aug 30 16:38:11 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52E9516A4BF for ; Sat, 30 Aug 2003 16:38:11 -0700 (PDT) Received: from ussenterprise.ufp.org (ussenterprise.ufp.org [208.185.30.210]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6661D43FF7 for ; Sat, 30 Aug 2003 16:38:10 -0700 (PDT) (envelope-from bicknell@ussenterprise.ufp.org) Received: from ussenterprise.ufp.org (bicknell@localhost [127.0.0.1]) by ussenterprise.ufp.org (8.12.9/8.12.9) with ESMTP id h7UNc98i045829 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 30 Aug 2003 19:38:09 -0400 (EDT) Received: (from bicknell@localhost) by ussenterprise.ufp.org (8.12.9/8.12.9/Submit) id h7UNc9Wq045828 for freebsd-hackers@freebsd.org; Sat, 30 Aug 2003 19:38:09 -0400 (EDT) Date: Sat, 30 Aug 2003 19:38:09 -0400 From: Leo Bicknell To: freebsd-hackers@freebsd.org Message-ID: <20030830233809.GA45579@ussenterprise.ufp.org> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20030830221458.GC85746@cirb503493.alcatel.com.au> <20030830230628.98508.qmail@web13406.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+QahgC5+KEYLbs62" Content-Disposition: inline In-Reply-To: <20030830230628.98508.qmail@web13406.mail.yahoo.com> Organization: United Federation of Planets X-PGP-Key: http://www.ufp.org/~bicknell/ Subject: Re: Non-executable mappings now in NetBSD too X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Aug 2003 23:38:11 -0000 --+QahgC5+KEYLbs62 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In a message written on Sun, Aug 31, 2003 at 12:06:28AM +0100, Pedro F. Gif= funi wrote: > Well, we only have a JIT JVM for the i386, and on the particular case of = the > i386 we cannot enforce full protection anyways so there is probably a > workaround if we do need it.=20 I'm not sure I want to suggest this, as I can't decide if it's a "hack" or a good solution. I'm feeling bold though, so I'll throw it out there. Honestly, I don't know the kernel internals enough to know if this would eliminate the problem. Could a new malloc (and friends) set of functions be defined, for argument I'll call them "emalloc" that executes memory that is executable? The JIT type apps could use that for the instructions (and the instructions only) allowing them to be executable, and all existing code would continue to be executable. Seems like this would protect all existing code, and give a nice way for the apps that need it to "label" to executable bits outright, so they both don't loose functionality but also so the execute right is tightly scoped. Note, I do understand you can do this with syscall wrappers, but that seems to introduce a performance penalty no one likes. Wrappering it in a new malloc (sbrk?) interface to the kernel might allow the same thing with much less penalty. Of course, we'd need multiple platforms to make developers use it. --=20 Leo Bicknell - bicknell@ufp.org - CCIE 3440 PGP keys at http://www.ufp.org/~bicknell/ Read TMBG List - tmbg-list-request@tmbg.org, www.tmbg.org --+QahgC5+KEYLbs62 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/UTVhNh6mMG5yMTYRAgBbAJ4zIfIAeLGNy3YIkYfxD+r4g4ZR0QCffqGY 2EIgcCof9kpgH+BlJ6T00/I= =vCEH -----END PGP SIGNATURE----- --+QahgC5+KEYLbs62--