fakeroot broken (by shm changes?)
fakeroot's stopped working since upgrading to the new kernel, so i think the emulation of the old sysvipc mechanism may be broken. this is on paer, running a 64-bit SMP kernel. i suspect sysvipc rather than signals because fakeroot is a heavy user of sysvipc and exposed some kernel bugs before.
i'm not going to be around till monday afternoon (evening your time), but it's pretty easy to reproduce -- just run `fakeroot echo hello'.
Signature · 1 line
Revolutions do not require corporate support.
Quoted 5 lines · Matthew Wilcox
fakeroot's stopped working since upgrading to the new kernel, so i think the emulation of the old sysvipc mechanism may be broken. this is on paer, running a 64-bit SMP kernel. i suspect sysvipc rather than signals because fakeroot is a heavy user of sysvipc and exposed some kernel bugs before.
semctl (,,SETVAL,) is broken. Below is an untested fix, which is taken from the old sys32_semctl. So this should fix the problem. Since I don't have enough time right now to test it, I'd appriciate if someone with a 64bit machine (the bug doesn't affect 32bit) could test it. Sorry for missing that strange feature of our syscall path and the already existing workaround for it.
Thomas.
Index: sys_parisc32.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/sys_parisc32.c,v retrieving revision 1.24
sys_parisc32.c +17 -0
@@ -3040,3 +3040,20 @@return sys_lseek (fd, offset, origin); } +asmlinkage long sys32_semctl_broken (int semid,int semnum,int cmd,union semun arg) +{ +union semun u; + + cmd ~= IPC64; /* should be removed together with the _broken suffix */ + +if (cmd ==SETVAL ) { +/* Ugh. arg is a union of int,ptr,ptr,ptr, so is 8 bytes. +* The int should be in the first 4, but our argument +* frobbing has left it in the last 4. +*/ + u.val = *((int *)&arg +1 ); +return sys_semctl (semid, semnum, cmd, u); + } +return sys_semctl (semid, semnum, cmd, arg); +} +
Index: syscall.S
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/syscall.S,v retrieving revision 1.72
syscall.S +1 -1
@@ -577,7 +577,7 @@ ENTRY_DIFF(recvmsg) ENTRY_SAME(semop) /* 185 */ ENTRY_SAME(semget) - ENTRY_SAME(semctl_broken) + ENTRY_DIFF(semctl_broken) ENTRY_DIFF(msgsnd) ENTRY_DIFF(msgrcv) ENTRY_SAME(msgget) /* 190 */
Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessary a good idea. [ Alexander Viro on linux-kernel ]