Thursday, 29 January 2015

Implementing missing Linux syscalls in the FreeBSD linuxulator

So I've taken the plunge and now run FreeBSD full-time on my laptop (11-CURRENT because I have never shied away from the bleeding edge, even if I shoot myself in the foot in the entire process). So far everything seems to work fine, though I have to load i915kms after boot completes, and I get the occasional lock-order reversal warning (so far nothing serious). Pretty nice.

What has bugged me though is the state of FreeBSD's linuxulator. It's reasonably complete enough to run flash, but I desire something a bit more. Here is the laundry list of things I want to do:

* Implement missing syscalls (at least the most commonly used ones) where appropriate
* 64-bit Linux (not just 32-on-64 bit) support (will need to investigate this a bit more, this will require some dark magic)

Currently I am implementing calls required to run Gentoo in a chroot. So far emerge doesn't work due to several unimplemented calls:
linux: pid 51309 (dircolors): syscall dup3 not implemented
linux: pid 51310 (python3.3): syscall prlimit64 not implemented
linux: pid 51310 (python3.3): syscall sendmmsg not implemented
linux: pid 51314 (rsync): syscall utimensat not implemented
linux: pid 51395 (python3.3): syscall prlimit64 not implemented
linux: pid 51395 (python3.3): syscall epoll_create not implemented
I have already implemented dup3 and will be sending patches to the mailing list. Anna has already implemented goodtimesutimensat. Next on my laundry list is probably the epoll_* family, which I intend to implement by translating all the calls to kqueue equivalents. I have no idea what the others are yet, but I am investigating.

Stay tuned...

No comments :

Post a Comment