linux-mips
[Top] [All Lists]

shm ipc broken

To: linux-mips@oss.sgi.com
Subject: shm ipc broken
From: Guido Guenther <guido.guenther@gmx.net>
Date: Sun, 29 Apr 2001 21:06:01 +0200
Cc: Ralf Baechle <ralf@uni-koblenz.de>
Mail-followup-to: linux-mips@oss.sgi.com, Ralf Baechle <ralf@uni-koblenz.de>
Sender: owner-linux-mips@oss.sgi.com
User-agent: Mutt/1.2.5i
The attached patch fixes a problem with shm ipc. The structs ipc_perm in
/u/i/bits/ipc.h and ipc64_perm in include/asm/ipcbuf.h had different sizes
and so caused the copy_shminfo_to_user in ipc/shm.c to corrupt user space(the
kernel structure was 8 bytes larger). This is probably not the correct fix,
since the other arches have this padding, so maybe glibc must be fixed.
There's still a small problem since shm_nattch is a short in glibc and a long
in the kernel, so the attach-numbers are wrong(which I'm also not sure where
it has to be fixed).  
 -- Guido

P.S.: this fixes the X server crashes some people were seeing.

Attachment: shm_fix-2001-04-29.diff
Description: Text document

<Prev in Thread] Current Thread [Next in Thread>