On 29/01/16 12:54, Patrick Welche wrote:
In NetBSD source, /sys/rump/kern/Makefile.rumpkerncomp containsRUMPSYSEMUS= sys_cygwin sys_linux sys_sunos .if make(rumpdescribe) RUMPKERNCOMPS+= ${RUMPSYSEMUS} .endif which looks at a guess as if sys_linux isn't compiled into a rump kernel by default, but if it were, I might be able to test compat_linux code with rump? Is this a reasonable guess? What is going on?
Yes, but you also need a "Linux binary". Generating Linux binaries is easy if you're on Linux, but otherwise not so much. IIRC some years ago njoly@netbsd was testing compat_linux by using ljsyscall(*) as the "Linux binary". Using ljsyscall has the advantage of giving you the Linux syscall ABI on any system where ljsyscall runs.
So essentially if you build and link rumpkern_sys_linux into a rump kernel, all local(?) syscalls get pre- and post-translation for the Linux ABI. At least that's how I seem to recall it worked. The hard part which I don't think I ever implemented satisfactorily was doing per-process syscall vector selection, and that's also why remote syscalls always go through the native NetBSD ABI. That is, unless my memory fails me, which seems to happen quite often these days ...
*) https://github.com/justincormack/ljsyscall
