The patch titled Subject: ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC has been added to the -mm tree. Its filename is ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Will Deacon <will.deacon@xxxxxxx> Subject: ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC Commit 48b25c43 ("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@xxxxxxxxxx> Cc: Arnd Bergmann <arnd@xxxxxxxx> Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx> Signed-off-by: Will Deacon <will.deacon@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- include/linux/compat.h | 1 + ipc/compat.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff -puN include/linux/compat.h~ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc include/linux/compat.h --- a/include/linux/compat.h~ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc +++ a/include/linux/compat.h @@ -256,6 +256,7 @@ compat_sys_get_robust_list(int pid, comp compat_size_t __user *len_ptr); #ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC +#define __ARCH_WANT_COMPAT_IPC_PARSE_VERSION long compat_sys_semctl(int first, int second, int third, void __user *uptr); long compat_sys_msgsnd(int first, int second, int third, void __user *uptr); long compat_sys_msgrcv(int first, int second, int msgtyp, int third, diff -puN ipc/compat.c~ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc ipc/compat.c --- a/ipc/compat.c~ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc +++ a/ipc/compat.c @@ -118,7 +118,7 @@ extern int sem_ctls[]; static inline int compat_ipc_parse_version(int *cmd) { -#ifdef CONFIG_ARCH_WANT_OLD_COMPAT_IPC +#ifdef __ARCH_WANT_COMPAT_IPC_PARSE_VERSION int version = *cmd & IPC_64; /* this is tricky: architectures that have support for the old _ Subject: Subject: ipc: allow compat IPC version field parsing if !ARCH_WANT_OLD_COMPAT_IPC Patches currently in -mm which might be from will.deacon@xxxxxxx are linux-next.patch ipc-add-compat_shmlba-support.patch ipc-allow-compat-ipc-version-field-parsing-if-arch_want_old_compat_ipc.patch ipc-compat-use-signed-size_t-types-for-msgsnd-and-msgrcv.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html