• Andi Kleen's avatar
    [PATCH] Fix compat shmget overflow · 1e8a9345
    Andi Kleen authored
    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: default avatarAndi Kleen <ak@suse.de>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1e8a9345
sys_sparc32.c 43.5 KB