aboutsummaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorWill Deacon2012-07-30 16:42:40 -0500
committerLinus Torvalds2012-07-30 19:25:21 -0500
commitb610c04c667f3c056243fd64041c7f152a512ee4 (patch)
tree786aef5a19de67d3b0480695703dd044a433f8bb /ipc
parent079a96ae3871f0ed9083aac2218136ccec5b9877 (diff)
downloadkernel-omap-b610c04c667f3c056243fd64041c7f152a512ee4.tar.gz
kernel-omap-b610c04c667f3c056243fd64041c7f152a512ee4.tar.xz
kernel-omap-b610c04c667f3c056243fd64041c7f152a512ee4.zip
ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC
Commit 48b25c43e6ee ("ipc: provide generic compat versions of IPC syscalls") added a new ARCH_WANT_OLD_COMPAT_IPC config option for architectures to select if their compat target requires the old IPC syscall interface. For architectures (such as AArch64) that do not require the internal calling conventions provided by this option, but have a compat target where the C library passes the IPC_64 flag explicitly, compat_ipc_parse_version no longer strips out the flag before calling the native system call implementation, resulting in unknown SHM/IPC commands and -EINVAL being returned to userspace. This patch separates the selection of the internal calling conventions for the IPC syscalls from the version parsing, allowing architectures to select __ARCH_WANT_COMPAT_IPC_PARSE_VERSION if they want to use version parsing whilst retaining the newer syscall calling conventions. Acked-by: Chris Metcalf <cmetcalf@tilera.com> Cc: Arnd Bergmann <arnd@arndb.de> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/compat.c b/ipc/compat.c
index 53cebdf80e3c..a41600f6ba52 100644
--- a/ipc/compat.c
+++ b/ipc/compat.c
@@ -118,7 +118,7 @@ extern int sem_ctls[];
118 118
119static inline int compat_ipc_parse_version(int *cmd) 119static inline int compat_ipc_parse_version(int *cmd)
120{ 120{
121#ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC 121#ifdef __ARCH_WANT_COMPAT_IPC_PARSE_VERSION
122 int version = *cmd & IPC_64; 122 int version = *cmd & IPC_64;
123 123
124 /* this is tricky: architectures that have support for the old 124 /* this is tricky: architectures that have support for the old