]> git.neil.brown.name Git - history.git/commit
[PATCH] Fix compat shmget overflow
authorAndi Kleen <ak@suse.de>
Thu, 10 Feb 2005 06:39:59 +0000 (22:39 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Thu, 10 Feb 2005 06:39:59 +0000 (22:39 -0800)
commit1e8a93458ffca64b7ca4dba226a9e889ae3e1174
treef58e8fdfafb7f8bdf6d60ca477930b279075e72b
parent46f4fe4bc14d8bd027eb6cba2c206e3b4f35b177
[PATCH] Fix compat shmget overflow

This fixes an incorrect sign extension in the compat layer that breaks
32bit shmget that are >2GB.  sys_shmget has a signed size_t size argument,
and the int size argument coming from 32bit user space would get sign
extended to 64bit, which is wrong.

I fixed it on all compat architectures, except PPC64 which was already ok.

It was originally debugged and fixed by Karl Rister @ IBM for SLES9 on x86-64.

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/ia64/ia32/sys_ia32.c
arch/mips/kernel/linux32.c
arch/s390/kernel/compat_linux.c
arch/sparc64/kernel/sys_sparc32.c
arch/x86_64/ia32/ipc32.c