that use struct ifreq which have not been explicitly versioned.
If someone feels like fixing it with a list aproach, I think below is
a complete list - the one used in the previous version missed a lot of them.
BIOCGETIF
BIOCSETIF
GREDSOCK
GREGADDRD
GREGADDRS
GREGPROTO
GRESADDRD
GRESADDRS
GRESPROTO
GRESSOCK
SIOCADDMULTI
SIOCDELMULTI
SIOCDIFADDR
SIOCDIFADDR_IN6
SIOCDIFPHYADDR
SIOCGDEFIFACE_IN6
SIOCGIFADDR
SIOCGIFADDR_IN6
SIOCGIFAFLAG_IN6
SIOCGIFALIFETIME_IN6
SIOCGIFBRDADDR
SIOCGIFDLT
SIOCGIFDSTADDR
SIOCGIFDSTADDR_IN6
SIOCGIFFLAGS
SIOCGIFGENERIC
SIOCGIFMETRIC
SIOCGIFMTU
SIOCGIFNETMASK
SIOCGIFNETMASK_IN6
SIOCGIFPDSTADDR
SIOCGIFPDSTADDR_IN6
SIOCGIFPSRCADDR
SIOCGIFPSRCADDR_IN6
SIOCGIFSTAT_ICMP6
SIOCGIFSTAT_IN6
SIOCGPVCSIF
SIOCGVH
SIOCIFCREATE
SIOCIFDESTROY
SIOCSDEFIFACE_IN6
SIOCSIFADDR
SIOCSIFADDR_IN6
SIOCSIFALIFETIME_IN6
SIOCSIFBRDADDR
SIOCSIFDSTADDR
SIOCSIFDSTADDR_IN6
SIOCSIFFLAGS
SIOCSIFGENERIC
SIOCSIFMEDIA
SIOCSIFMETRIC
SIOCSIFMTU
SIOCSIFNETMASK
SIOCSIFNETMASK_IN6
SIOCSNDFLUSH_IN6
SIOCSPFXFLUSH_IN6
SIOCSPVCSIF
SIOCSRTRFLUSH_IN6
SIOCSVH
TAPGIFNAME
values of the SS_ONSTACK and SS_DISABLE constants.
Use it to shorten the source files when this action is replicated.
Actually, given the monstrous complexity of sigaltstack1() there is
probably a much better way to do this...
once the 'address' has been copied into an mbuf.
Add extra flags for 'struct msghdr.msg_flags' to indicate that the address
and control are already in mbufs, and that the uio structure is in userspace
for sending data, rename sendit() to do_sys_sendmsg() to ensure no old code
passes in random flags.
Changes to compat code to use new functions - removing some stackgap use.
Fix a 'use after free' in compat_43_sys_recvmsg.
I ***THINK*** the code that converts 'cmsg' formatted data is borked!
svr4_stream.c ought to be generated from svr4_32_stream.c during the build.
compatibility with the older ioctls. This avoids stack smashing and
abuse of "struct sockaddr" when ioctls placed "struct sockaddr_foo's" that
were longer than "struct sockaddr".
XXX: Some of the emulations might be broken; I tried to add code for
them but I did not test them.
and 'rusage' without having to copy data to/from stackgap buffers.
The old split (find_stopped_child) could be removed.
amd64 seems to run netbsd32, linux and linux32 emulations. sparc64 compiles.
which can either be copied directly to userspace, or converted then copied.
Saves replicating a lot of code in the compat functions (esp. for
getvfsstat) at a cast of an extra function call in the non-emulated case -
which is unlikely to be measurable given the other costs of the actions
involved (even on vax).
Remove dofhstat() and dofhstatvfs() (and the last caller).
Remove some redundant stackgap_init() calls.
avoid having to allocate space in the 'stackgap'
- which is very LWP unfriendly.
The additional code for non-emulation namei() is trivial, the reduction for
the emulations is massive.
The vnode for a processes emulation root is saved in the cwdi structure
during process exec.
If the emulation root the TRYEMULROOT flag are set, namei() will do an initial
search for absolute pathnames in the emulation root, if that fails it will
retry from the normal root.
".." at the emulation root will always go to the real root, even in the middle
of paths and when expanding symlinks.
Absolute symlinks found using absolute paths in the emulation root will be
relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links
inside the emulation root don't need changing).
If the root of the emulation would be returned (for an emulation lookup), then
the real root is returned instead (matching the behaviour of emul_lookup,
but being a cheap comparison here) so that programs that scan "../.."
looking for the root dircetory don't loop forever.
The target for symbolic links is no longer mangled (it used to get the
CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended).
CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding
TRYEMULROOT to the flags to NDINIT().
A lot of the emulation system call stubs could now be deleted.
sys_stat() and friends, instead use do_sys_stat() and do_sys_fstat()
that write the answer into a kernel buffer (on stack) that can be
converted to the correct form and written the userspace.
I've test compiled a few kernels, and tested i386 netbsd1.6 ls.
Given I think I've fixed some bugs, it might be 50-50 with new ones.
Patch by Slava Semushin <slava.semushin@gmail.com>
Again, this was tested by comparing obj files from a pristine and a patched
source tree against an i386/ALL kernel, and also for src/sbin/fsck_ffs,
src/sbin/fsdb and src/usr.sbin/makefs. Only changes in assert() line numbers
were detected in 'objdump -d' output.
- remove the support of variable-sized filehandle from compat version of
syscalls. (strictly speaking, it breaks abi. i don't think it's a problem
because this feature is short-lived and there are no affected in-tree
filesystems.)
- unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size.
- vfs_copyinfh_alloc_size: check fhsize strictly.
- reduce code duplication between compat and current syscalls.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ,
version the getfh(2) syscall and explicitly pass the size available in
the filehandle from userland.
Discussed on tech-kern, with lots of help from yamt (thanks!).
EPROTONOSUPPORT instead of EAFNOSUPPORT.
from pavel@ with a little bit of clean up from myself.
XXX: netbsd32 (and perhaps other emulations) should be able
XXX: to call the standard socket calls for this i think, but
XXX: revisit this at another time.
- proc_is_traced_p() -> trace_is_enabled(), to match trace_enter() and
trace_exit().
- trace_is_enabled() becomes a real function.
- Remove unnecessary include files from various files that used to care
about KTRACE and SYSTRACE, but do no more.