From owner-svn-src-all@FreeBSD.ORG Thu Oct 13 18:20:33 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2D01106566B; Thu, 13 Oct 2011 18:20:33 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6998FC0C; Thu, 13 Oct 2011 18:20:32 +0000 (UTC) Received: from alf.home (alf.kiev.zoral.com.ua [10.1.1.177]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p9DIKPus029606 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 13 Oct 2011 21:20:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from alf.home (kostik@localhost [127.0.0.1]) by alf.home (8.14.5/8.14.5) with ESMTP id p9DIKPHH036118; Thu, 13 Oct 2011 21:20:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by alf.home (8.14.5/8.14.5/Submit) id p9DIKPtu036117; Thu, 13 Oct 2011 21:20:25 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: alf.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 13 Oct 2011 21:20:25 +0300 From: Kostik Belousov To: Marcel Moolenaar Message-ID: <20111013182025.GK1511@deviant.kiev.zoral.com.ua> References: <201110131620.p9DGKAM2022926@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ywvyGaV92PjvegkV" Content-Disposition: inline In-Reply-To: <201110131620.p9DGKAM2022926@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r226343 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2011 18:20:33 -0000 --ywvyGaV92PjvegkV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Oct 13, 2011 at 04:20:10PM +0000, Marcel Moolenaar wrote: > Author: marcel > Date: Thu Oct 13 16:20:10 2011 > New Revision: 226343 > URL: http://svn.freebsd.org/changeset/base/226343 >=20 > Log: > In sys_obreak() and when compiling for amd64 or ia64, when the process > is ILP32 (i.e. i386) grant execute permissions by default. The JDK 1.4.x > depends on being able to execute from the heap on i386. >=20 > Modified: > head/sys/vm/vm_unix.c >=20 > Modified: head/sys/vm/vm_unix.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/vm/vm_unix.c Thu Oct 13 16:16:46 2011 (r226342) > +++ head/sys/vm/vm_unix.c Thu Oct 13 16:20:10 2011 (r226343) > @@ -36,6 +36,8 @@ > * @(#)vm_unix.c 8.1 (Berkeley) 6/11/93 > */ > =20 > +#include "opt_compat.h" > + > /* > * Traditional sbrk/grow interface to VM > */ > @@ -49,6 +51,7 @@ __FBSDID("$FreeBSD$"); > #include > #include > #include > +#include > #include > #include > =20 > @@ -75,7 +78,7 @@ sys_obreak(td, uap) > struct vmspace *vm =3D td->td_proc->p_vmspace; > vm_offset_t new, old, base; > rlim_t datalim, vmemlim; > - int rv; > + int prot, rv; > int error =3D 0; > boolean_t do_map_wirefuture; > =20 > @@ -135,8 +138,15 @@ sys_obreak(td, uap) > } > PROC_UNLOCK(td->td_proc); > #endif > + prot =3D VM_PROT_RW; > +#ifdef COMPAT_FREEBSD32 > +#if defined(__amd64__) || defined(__ia64__) > + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) > + prot |=3D VM_PROT_EXECUTE; > +#endif > +#endif > rv =3D vm_map_insert(&vm->vm_map, NULL, 0, old, new, > - VM_PROT_RW, VM_PROT_ALL, 0); > + prot, VM_PROT_ALL, 0); > if (rv !=3D KERN_SUCCESS) { > #ifdef RACCT > PROC_LOCK(td->td_proc); The two commits removed NX support for .data/.bss for 32bit binaries on amd= 64. This is too unfortunate. Can we claim that only old binaries need this hack= ? If yes, could you, please, conditionalize the hack on curproc->p_osrel being, say, 4.x ? --ywvyGaV92PjvegkV Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.18 (FreeBSD) iEYEARECAAYFAk6XK+gACgkQC3+MBN1Mb4iR+gCePAhKnyEsWSbiOUzsOcsm66Cy P8EAoL0A40cus5B5TkizjrgU2CBk3ewr =fFqb -----END PGP SIGNATURE----- --ywvyGaV92PjvegkV--