Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Oct 2011 13:13:10 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Kostik Belousov <kostikbel@gmail.com>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org
Subject:   Re: svn commit: r226343 - head/sys/vm
Message-ID:  <D6F3D623-23A5-4147-A439-746AD670DE14@xcllnt.net>
In-Reply-To: <20111013190943.GM1511@deviant.kiev.zoral.com.ua>
References:  <201110131620.p9DGKAM2022926@svn.freebsd.org> <20111013182025.GK1511@deviant.kiev.zoral.com.ua> <7FB94714-3E47-4E1E-947A-AC62FF071135@xcllnt.net> <20111013190943.GM1511@deviant.kiev.zoral.com.ua>

next in thread | previous in thread | raw e-mail | index | archive | help

On Oct 13, 2011, at 12:09 PM, Kostik Belousov wrote:

> On Thu, Oct 13, 2011 at 11:30:12AM -0700, Marcel Moolenaar wrote:
>> 
>> On Oct 13, 2011, at 11:20 AM, Kostik Belousov wrote:
>> 
>>> The two commits removed NX support for .data/.bss for 32bit binaries
>>> Thon amd64. is is too unfortunate. Can we claim that only old
>>> Thbinaries need this hack ?
>> 
>> I don't know. When did our ABI for i386 change to have NX by default?
> I think it changed de-facto when NX appears to be supported by hardware.
> In other words, PF_R->PF_X was always considered a coincident, and not
> a promise.

That's really besides the point. ABI changes are made deliberately
and ABIs must be well-documented for anyone to adhere to it. You
can't post hoc wave your hand and say that at some unspecified time
in the past the ABI changed: at what precise time does "supported
by hardware mean" and how does that tie to a major FreeBSD version?

Point in case: the JDK 1.4.x still works on FreeBSD 9.x (i386), so
the ABI really hasn't changed at all in that respect.

> I think we can claim that the moment FreeBSD gained PAE support, it happen.

We cannot make that claim at at.

> I would suggest to add a sysctl, say kern.elf32.readable_nx, with
> the values:
> 0 - strictly follow segment permissions
> 1 - PF_R implies PF_X if p_osrel < 600000
> 2 - PF_R always implied PF_X
> for 32bit binaries.

A sysctl is a good idea, but I would just give it a 0/1 value.
Adding a "p_osrel < 600000" case is entirely without grounds.

-- 
Marcel Moolenaar
marcel@xcllnt.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D6F3D623-23A5-4147-A439-746AD670DE14>