librumphijack reserves for rump to use.
This is not normally a problem, as most applications don't attempt
to use very high fds - but /bin/sh does.
This fix is something of a kludge - really the apparent fd resource limit
ought to be lowered as well, but this is sufficient to allow the shell
to work (when its dup2() gets rejected, it just tries again with a smaller
target fd until it eventually succeeds.) This fixes the librumphijack
shell ATF tests.
A better, more comprehensive, fix would be good...
Fixes hijacking processes that vfork and exec. Symptom was the child
would spin with read/EAGAIN <-> kevent/EBADF because the inheritance
mechanism relied on setting the holyfd to -1 on fork...which didn't
happen if we didn't hijack vfork.
ok pooka@
rump kernel starts from 0.
Fixes rumphijack fdoff test (notably, this bug had nothing to do with
fdoff, and was exposed >3 years after writing the test when rump kernels
started providing fd's 0/1/2)
calls which are not supported on Linux and therefore cannot be
handled by the rump kernel side syscall emulation (not that they'd
be present in the calling binaries anyway).
emulation of them these get passed as exit values from a pthread as
a void* (c.f. pthread_join(), pthread_exit()).
Do not use the address of an int variable for these, but provide the address
of a void* and assign the value afterwards.
Fixes hijacking of pollts/select on 64bit big endian hosts.
Spotted by and fix from pooka.
- struct vfs_quotactl_args -> struct quotactl_args
- add sys/stdint.h to sys/quotactl.h for clean userland build
- install sys/quotactl.h in /usr/include
- update set lists for same
- add new marshalling code in libquota
- add new unmarshalling code in vfs_syscalls.c
- discard proplib interpreter code in vfs_quotactl.c
- add dispatching code for the 14 quotactl ops in vfs_quotactl.c
- mark the proplib quotactl syscall obsolete
- add a new syscall number for the new quotactl syscall
- change the name of the syscall to __quotactl()
- remove the decl of the old quotactl from quota/quotaprop.h
- add a decl of the new quotactl to sys/quotactl.h
- update the libc build
- update ktruss
- remove proplib marshalling code from libquota
- update copy of syscall table in gdb ppc sources
- hack rumphijack to accomodate new quotactl name (as I recall,
pooka wanted such a name change to simplify something, but I
don't really see what/how)
This change appears to require a kernel version bump for rumpish
reasons.
init. Otherwise powerpc dlsym() DTWT and returns NULL.
(now i have no idea why dlsym() it works from rcinit(), but i'll
opt to not care)
Hah, only took 15min to debug that crap this time around. I'm
quickly approaching zero-time with it.