parisc: fix shmctl(SHM_INFO) breakage on 64bit kernel
Helge Deller
maintainerPATCH 1/1 parisc: fix shmctl(SHM_INFO) breakage on 64bit kernel
I noticed, that shmctl(SHM_INFO) is broken when running on a 64bit kernel (with 32bit userspace).
I assume we need to enable the IPC compat layer, at least for some functions.
Below is a preliminary patch - the compat_XXX structures are probably wrong and need changing. I think I copied them from a little-endian architecture, while I better should have checked with a big-endian one. So, please DO NOT apply yet.
And, we need to check the other ipc_compat functions as well...
Signed-off-by Helge Deller <[email protected]>
arch/parisc/Kconfig +4 -0
@@ -289,6 +289,10 @@ menu "Executable file formats" source "fs/Kconfig.binfmt" +config SYSVIPC_COMPAT + def_bool y + depends on COMPAT && SYSVIPC + endmenu source "net/Kconfig"
arch/parisc/include/asm/compat.h +60 -0
72 lines not on this page · raw message
arch/parisc/kernel/syscall_table.S +1 -1
@@ -293,7 +293,7 @@ ENTRY_SAME(shmat) ENTRY_SAME(shmdt) ENTRY_SAME(shmget) - ENTRY_SAME(shmctl) /* 195 */ + ENTRY_COMP(shmctl) /* 195 */ ENTRY_SAME(ni_syscall) /* streams1 */ ENTRY_SAME(ni_syscall) /* streams2 */ ENTRY_SAME(lstat64)