WSL2-Linux-Kernel/ipc
Anton Blanchard 45575f5a42 ppc64 sys_ipc breakage in 2.6.34-rc2
I chased down a fail on ppc64 on 2.6.34-rc2 where an application that
uses shared memory was getting a SEGV.

Commit baed7fc9b5 ("Add generic sys_ipc
wrapper") changed the second argument from an unsigned long to an int.
When we call shmget the system call wrappers for sys_ipc will sign
extend second (ie the size) which truncates it.  It took a while to
track down because the call succeeds and strace shows the untruncated
size :)

The patch below changes second from an int to an unsigned long which
fixes shmget on ppc64 (and I assume s390, sparc64 and mips64).

Signed-off-by: Anton Blanchard <anton@samba.org>
--

I assume the function prototypes for the other IPC methods would cause us
to sign or zero extend second where appropriate (avoiding any security
issues). Come to think of it, the syscall wrappers for each method should do
that for us as well.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-03-22 09:57:19 -07:00
..
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
compat.c fix logic error in ipc compat semctl() 2007-07-06 10:23:43 -07:00
compat_mq.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipc_sysctl.c sysctl ipc: Remove dead binary sysctl support code. 2009-11-12 02:04:54 -08:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
mq_sysctl.c sysctl ipc: Remove dead binary sysctl support code. 2009-11-12 02:04:54 -08:00
mqueue.c ipc: use rlimit helpers 2010-03-12 15:52:39 -08:00
msg.c ipc ns: fix memory leak (idr) 2009-12-16 07:20:09 -08:00
msgutil.c namespaces: ipc namespaces: implement support for posix msqueues 2009-04-07 08:31:09 -07:00
namespace.c ipcns: make free_ipc_ns() static 2009-06-18 13:03:56 -07:00
sem.c ipc: remove unreachable code in sem.c 2009-12-16 07:20:10 -08:00
shm.c ipc: use rlimit helpers 2010-03-12 15:52:39 -08:00
syscall.c ppc64 sys_ipc breakage in 2.6.34-rc2 2010-03-22 09:57:19 -07:00
util.c seq_file: constify seq_operations 2009-09-23 07:39:29 -07:00
util.h ipc: unbreak 32-bit shmctl/semctl/msgctl 2009-06-21 12:48:43 -07:00