History log of /netbsd/sys/compat/linux/common/linux_ipc.c (Results 1 – 25 of 57)
Revision Date Author Comments
# 6067d9ac 23-Aug-2019 maxv <maxv@NetBSD.org>

Fix stupid bugs in linux_sys_shmctl(): the index could be out of bound
(page fault) and there was no proper locking.

Maybe we should just remove LINUX_SHM_STAT, like compat_linux32.


# 202a012a 21-Feb-2019 mrg <mrg@NetBSD.org>

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.

cop

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.

show more ...


# c51746a7 28-May-2011 alnsn <alnsn@NetBSD.org>

Fix typo in a comment.


# bf54b26c 16-Nov-2009 joerg <joerg@NetBSD.org>

Make sure to never leak padding space before copyout or copyin
uninitialized fields by explicitly using memset in the conversion
routines.


# d3dabe12 23-Apr-2009 njoly <njoly@NetBSD.org>

Add IPC_64 support for all semctl(2)/msgctl(2). Needed, at least on
i386 for Linux 2.6 emulation.


# a1cf1f2e 18-Feb-2009 njoly <njoly@NetBSD.org>

Add IPC_64 support for all shmctl(2) commands, not only for STAT/SET.
This make it work on i386 under 2.6 emulation.


# e82000b5 21-May-2008 njoly <njoly@NetBSD.org>

Add IPC_64 support to msgctl, needed for amd64.


# ce099b40 28-Apr-2008 martin <martin@NetBSD.org>

Remove clause 3 and 4 from TNF licenses


# 436fa0ef 24-Apr-2008 njoly <njoly@NetBSD.org>

Add IPC_64 support for semctl IPC_STAT/IPC_SET.


# d8f89665 21-Apr-2008 njoly <njoly@NetBSD.org>

Add LINUX_IPC_64 support for LINUX_IPC_SET in shmctl. Required, at
least, for amd64 which use LINUX_IPC_FORCE64.


# f1bd64da 21-Apr-2008 njoly <njoly@NetBSD.org>

Rename LINUX_SHMCTL_FORCEIPC64 define to LINUX_IPC_FORCE64.


# 69614dfe 16-Apr-2008 njoly <njoly@NetBSD.org>

Remove an obsolete comment about SHM_LOCK/SHM_UNLOCK being no-op.


# 3ce80f64 15-Apr-2008 njoly <njoly@NetBSD.org>

Remove unneeded amd64 ifdef/endif.


# 4eecf433 28-Jan-2008 njoly <njoly@NetBSD.org>

Make shmctl + {IPC,SHM}_STAT work an amd64, by forcing use of IPC_64.
Following the Linux kernel behaviour.


# 29158b16 28-Jan-2008 njoly <njoly@NetBSD.org>

shmctl fixes.

- SHM_STAT take an index as input, and return the corresponding shmid.
- IPC_INFO and SHM_INFO returns the highest used index.
- SHM_INFO expected the total used pages (not bytes) in s

shmctl fixes.

- SHM_STAT take an index as input, and return the corresponding shmid.
- IPC_INFO and SHM_INFO returns the highest used index.
- SHM_INFO expected the total used pages (not bytes) in shm_tot field
of struct shm_info.

show more ...


# 7e2790cf 20-Dec-2007 dsl <dsl@NetBSD.org>

Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code

Convert all the system call entry points from:
int foo(struct lwp *l, void *v, register_t *retval)
to:
int foo(struct lwp *l, const struct foo_args *uap, register_t *retval)
Fixup compat code to not write into 'uap' and (in some cases) to actually
pass a correctly formatted 'uap' structure with the right name to the
next routine.
A few 'compat' routines that just call standard ones have been deleted.
All the 'compat' code compiles (along with the kernels required to test
build it).
98% done by automated scripts.

show more ...


# 28bae79b 08-Dec-2007 dsl <dsl@NetBSD.org>

ANSIfy most of the function definitions in sys/compat (but not ndis).
All by the magic of sed ...


# c271f319 17-Jun-2007 dsl <dsl@NetBSD.org>

Do the sysv ipc calls without the stackgap.


# 53524e44 04-Mar-2007 christos <christos@NetBSD.org>

Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.


# b07ec3fc 09-Feb-2007 ad <ad@NetBSD.org>

Merge newlock2 to head.


# 717102f4 13-Sep-2006 manu <manu@NetBSD.org>

Jumbo COMPAT_LINUX/COMPAT_LINUX32 bugfix, with the help of Nicolas Joly
- Fix shmat return value on amd64: it uses no black magic with retval[0]
- Fix integer overflows in sysinfo
- Implement sysinfo

Jumbo COMPAT_LINUX/COMPAT_LINUX32 bugfix, with the help of Nicolas Joly
- Fix shmat return value on amd64: it uses no black magic with retval[0]
- Fix integer overflows in sysinfo
- Implement sysinfo, mmap2, sched_getparam, sched_getscheduler, mremap,
and madvise in COMPAT_LINUX32
- Fix improper types used in setgroups16/getgroups16
- Implement mmap2 for COMPAT_LINUX32
- Ifdef debug messages by DEBUG_LINUX

show more ...


# 432f035f 24-Aug-2006 manu <manu@NetBSD.org>

The return value for Linux shmat on amd64 does not suffer the same horrible
hack as on i386.


# f474dceb 23-Jul-2006 ad <ad@NetBSD.org>

Use the LWP cached credentials where sane.


# 663b29bb 09-Feb-2006 dogcow <dogcow@NetBSD.org>

make linux emulation compile on i386 again.


# ee0c5b44 09-Feb-2006 manu <manu@NetBSD.org>

Add initial (but unfinished) COMPAT_LINUX32 for amd64. This is good enough so
that the i386 license manager part of amd64 version of Fluent works.

While I'm here, add SysV IPC to COMPAT_LINUX/amd64


123