NetBSD/src wF8veFlsys/compat/linux/common linux_ipc.c, sys/compat/linux32/common linux32_ipccall.c

   Pull up following revision(s) (requested by mrg in ticket #1679):
        sys/compat/sys/ipc.h: revision 1.6
        sys/compat/sys/ipc.h: revision 1.7
        sys/compat/sys/shm.h: revision 1.8
        sys/kern/sysv_shm.c: revision 1.133
        sys/compat/sys/sem.h: revision 1.7
        sys/compat/linux/common/linux_ipc.c: revision 1.56
        sys/compat/netbsd32/netbsd32_conv.h: revision 1.38
        sys/kern/sysv_sem.c: revision 1.96
        sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.28
        sys/compat/netbsd32/netbsd32_compat_14.c: revision 1.29
        sys/compat/linux32/common/linux32_ipccall.c: revision 1.12
        sys/kern/sysv_msg.c: revision 1.73
        sys/compat/sys/msg.h: revision 1.6

   for sysv ipc stat operations, explicitly copy the exported parts
   instead of the whole ds structure.
   besides triggering a recently added assert in netbsd32, this stops
   exposing kernel addresses.

   copy the mode clamping to 0777 from sem to shm and msg.

   while here, make sure that the compat callers to sysv_ipc clear
   the contents of the compat structure before setting the result
   members to ensure padding bytes are cleared.

   don't set/copy _sem_base, _msg_first, _msg_last or _shm_internal.
   even if used, which seems very dodgy, they leak KVAs as well.
   possibly this may affect linux binaries, in particular, the
   comments around _shm_internal ("XXX Oh well.") may mean apps
   rely upon these but hopefully not -- the comments date back to
   rev 1.1 in 1995.

   the _key, _seq and _msg_cbytes members are exported as before as
   i found multiple consumers of these (no less than ipcs(1), and
   they appear to be useful for debugging and more.

   XXX: the naming of compat functions have too many styles.  there
        are at least 3 different ones changed here.

   fix naming errors in previous.  (this file is no longer compiled, but
   this fix makes the pull up more obvious, before deleting this file.)

   include libkern.h or strings.h.  should fix i386 build issues.
VersionDeltaFile
1.11.46.1+20-16sys/compat/linux32/common/linux32_ipccall.c
1.55.42.1+16-13sys/compat/linux/common/linux_ipc.c
1.28.4.1.4.2+12-14sys/compat/netbsd32/netbsd32_conv.h
1.66.12.1+12-3sys/kern/sysv_msg.c
1.125.10.1+12-3sys/kern/sysv_shm.c
1.4.42.1+9-1sys/compat/sys/ipc.h
1.90.10.1+7-3sys/kern/sysv_sem.c
1.21.82.2+6-3sys/compat/netbsd32/netbsd32_compat_14.c
1.4.52.2+4-2sys/compat/sys/msg.h
1.7.50.1+3-1sys/compat/sys/shm.h
1.6.52.1+3-1sys/compat/sys/sem.h
+104-6011 files

UnifiedSplitRaw