FoxPro on FreeBSD

Konstantin Belousov kostikbel at gmail.com
Thu Oct 24 07:53:50 UTC 2013


On Wed, Oct 23, 2013 at 10:54:51PM -0700, Xin Li wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
> 
> On 10/23/13, 8:32 PM, Kevin Day wrote:
> > I did some debugging, and watched how the process was getting
> > launched, and I've managed to get it to load!
> > 
> > The problem was that COFF files expect to be mapped into memory at
> > address 0, something that processes are no longer allowed to do.
> > 
> > Run "sysctl security.bsd.map_at_zero=1?  or add
> > ?security.bsd.map_at_zero=1? to /etc/sysctl.conf and you should
> > have it working. We probably should either make an exception for
> > COFF files to bypass this the sysctl restriction, or at least print
> > a more helpful error than just letting the process segfault because
> > it didn?t get mapped where it was supposed to go.
> 
> Wow, this is impressive find, indeed!  Do they need to do the map at
> startup only, or do they want to explicitly map something at address 0
> during runtime?

How is this impressive ? Several variations of a.out and COFF binaries
are specified to start mapping of the text at 0.  This was one of the
reasons why I argued for sysctl to enable/disable mmap at zero by sysctl
instead of abruptly disallowing it, when corresponding 'security' feature
was discussed.

I documented the tuning needed to run a.out binaries in aout(4),
there are much more for it than just map at zero. If somebody wants to
provide similar hints for the COFF images, I cannot object.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20131024/ac2492e8/attachment.sig>


More information about the freebsd-hackers mailing list