On Sat, 22 Nov 2014 19:57:07 -0800
Peter Grehan <gre...@freebsd.org> wrote:

> Hi Shawn,
> > Interesting. I'll have to do more digging. Because removing map_at_zero
> > support is the same as keeping it at the default of 0. It's not possible
> > that our ASLR implementation is affecting bhyve, since our ASLR
> > implementation is in sys_mmap and the elf image activator. At this
> > stage, bhyve's vmm.ko is directly accessing vm_map_*, which we haven't
> > touched.
>   One thing you may be able to try is ktrace the bhyveload process and 
> see which syscall is failing.

Oliver fixed the problem. bhyve's vmm.ko uses VM_MIN_ADDRESS, which defaults to 
NULL in FreeBSD. We modified that to be at 64k to prevent NULL dereferences. 
Combine that with the removal of map_at_zero, NULL deref is not possible 
anymore. But since we bumped VM_MIN_ADDRESS up, bhyve's vmm.ko no longer 
attempts to map at NULL (which it absolutely needs to). The change Oliver made 
simply uses 0 instead of VM_MIN_ADDRESS. If this is a change FreeBSD wants 
upstream, we'd love it merged upstream.

Commit for reference: 


freebsd-virtualization@freebsd.org mailing list
To unsubscribe, send any mail to 

Reply via email to