Linux emulation on FreeBSD AMD64
rdivacky at freebsd.org
Sun Nov 4 04:20:43 PST 2007
> So, now all from mprotect calls executing with success,
> but 3 memory areas still missing execute bit and oracle as effect coredumps.
> In linux_mmap_common there is the same trick with "prot" argument like
> in linux_mprotect:
> * PROT_READ, PROT_WRITE, or PROT_EXEC implies PROT_READ and PROT_EXEC
> * on Linux/i386. We do this to ensure maximum compatibility.
> * Linux/ia64 does the same in i386 emulation mode.
> bsd_args.prot = linux_args->prot;
> if (bsd_args.prot & (PROT_READ | PROT_WRITE | PROT_EXEC))
> bsd_args.prot |= PROT_READ | PROT_EXEC;
> but turning on the debug for the linux_mmap_common gives no result.
> So linux_mmap_common not taking part in creating and changing rights of
> others 3 memory areas. So the question is what is the origin of this
> memory chunks? By calling which function there was created or managed?
> Maybe in this function there is place for the same hack with
> linux_args->prot to bsd_args.prot mapping?
I am a little confused.. you are saying that
1) oracle calls m* on 0x50000000 with PROT_EXEC but fbsd does not set it on the map
2) oracle does not set this protection at all and the OS is supposed to have set on default?
More information about the freebsd-emulation