Home | History | Annotate | Download | only in common
History log of /src/sys/compat/linux32/common/linux32_ipccall.c
RevisionDateAuthorComments
 1.12  21-Feb-2019  mrg 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.
 1.11  29-May-2010  dholland branches: 1.11.34; 1.11.38; 1.11.46; 1.11.52; 1.11.60;
Fix build without sysvipc configured, from Wolfgang Stukenbrock in PR 43376,
adjusted for current.
 1.10  05-Jan-2010  mbalmer branches: 1.10.2; 1.10.4;
Remove extra semicolon.
 1.9  18-Nov-2009  njoly Make compat linux/linux32 msgrcv_msgarg type member of type
long/netbsd32_long to match linux definition.
 1.8  18-Nov-2009  njoly Make linux32 msgsnd/msgrcv use the netbsd32 syscalls instead of native
ones, to ensure that msgbuf mtype member will be of the right type.
 1.7  18-Nov-2009  njoly Kill noisy debug printf.
 1.6  16-Nov-2009  joerg Follow up commit to fix breakage that somehow passed by the compiler.
 1.5  16-Nov-2009  joerg Add SYSVMSG support for linux32.
 1.4  27-Apr-2009  njoly branches: 1.4.2;
Add IPC_64 support to all semctl(2) commands, following corresponding
compat linux change.
 1.3  18-Feb-2009  njoly Add IPC_64 support for all shmctl(2) commands, and reduce diffs with
compat linux version.
 1.2  17-Sep-2008  scw branches: 1.2.2; 1.2.8;
In linux32_shmat() don't try to copyout a 64-bit pointer where userspace
is expecting a 32-bit result.

Fixes nspluginwrapper on amd64.
 1.1  20-May-2008  njoly branches: 1.1.2; 1.1.4; 1.1.8; 1.1.10;
Add compat linux32 ipc(2) syscall support, for shared memory and
semaphores.
 1.1.10.1  19-Oct-2008  haad Sync with HEAD.
 1.1.8.3  24-Sep-2008  wrstuden Merge in changes between wrstuden-revivesa-base-2 and
wrstuden-revivesa-base-3.
 1.1.8.2  23-Jun-2008  wrstuden Add files to branch that were added on -current.

After this, all that's left of update is to merge some changes
that had conflicts.
 1.1.8.1  20-May-2008  wrstuden file linux32_ipccall.c was added on branch wrstuden-revivesa on 2008-06-23 05:02:13 +0000
 1.1.4.2  04-Jun-2008  yamt sync with head
 1.1.4.1  20-May-2008  yamt file linux32_ipccall.c was added on branch yamt-pf42 on 2008-06-04 02:05:04 +0000
 1.1.2.3  28-Sep-2008  mjf Sync with HEAD.
 1.1.2.2  02-Jun-2008  mjf Sync with HEAD.
 1.1.2.1  20-May-2008  mjf file linux32_ipccall.c was added on branch mjf-devfs2 on 2008-06-02 13:23:04 +0000
 1.2.8.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.2.2.1  03-Mar-2009  skrll Sync with HEAD.
 1.4.2.4  11-Aug-2010  yamt sync with head.
 1.4.2.3  11-Mar-2010  yamt sync with head
 1.4.2.2  04-May-2009  yamt sync with head.
 1.4.2.1  27-Apr-2009  yamt file linux32_ipccall.c was added on branch yamt-nfs-mp on 2009-05-04 08:12:23 +0000
 1.10.4.1  30-May-2010  rmind sync with head
 1.10.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.11.60.1  10-Jun-2019  christos Sync with HEAD
 1.11.52.1  23-Feb-2019  martin Pull up following revision(s) (requested by mrg in ticket #1195):
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.
 1.11.46.1  23-Feb-2019  martin 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.
 1.11.38.1  23-Feb-2019  martin 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.
 1.11.34.1  23-Feb-2019  martin 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.

RSS XML Feed