소스 검색

hppa: do not set IPC_64 for the SysV IPC *ctl commands

parisc does not select ARCH_WANT_IPC_PARSE_VERSION, so its kernel never
strips the IPC_64 (0x100) bit from the command argument of semctl/msgctl/
shmctl; passing it leaves an unrecognised command and the call fails with
EINVAL.  uClibc gave hppa __IPC_64 = 0x100 (__ARCH_HAS_DEPRECATED_SYSCALLS__
&& __WORDSIZE == 32), breaking e.g. semctl(IPC_STAT) and the sem test.

Define __IPC_64 as 0x0 for hppa, like the asm-generic targets.

Verified with test/misc/sem under qemu-system-hppa.

Signed-off-by: Ramin Moussavi <ramin.moussavi@yacoub.de>
Ramin Moussavi 1 주 전
부모
커밋
e4391b9b88
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      libc/misc/sysvipc/ipc.h

+ 4 - 0
libc/misc/sysvipc/ipc.h

@@ -12,6 +12,10 @@
 # else
 #  define __IPC_64      0x0
 # endif
+#elif defined __hppa__
+/* parisc has no ARCH_WANT_IPC_PARSE_VERSION: the kernel never strips
+   IPC_64, so passing it makes semctl & co. fail with EINVAL.  */
+#  define __IPC_64	0x0
 #else
 # if __WORDSIZE == 32 || defined __alpha__
 #  define __IPC_64	0x100