Skip to contentSkip to conversation

parisc: fix shmctl(SHM_INFO) breakage on 64bit kernel

PATCH New Helge Deller 1 participant 1 message Aug 13, 2010 PA-RISC architecture

lore
Share & tools
lore

Helge Deller

author maintainer
#0 lore raw

PATCH 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...

arch/parisc/Kconfig +4 -0
index 05a366a..e2fe95c 100644
@@ -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
index 3d52c97..5293c90 100644
@@ -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)