From: Sasha Levin Date: Thu, 6 Feb 2020 04:53:39 +0000 (-0500) Subject: fixes for 5.4 X-Git-Tag: v4.19.103~157 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=79bafc8d5f693178d3c0e4ccafa6cc0719a6e20f;p=thirdparty%2Fkernel%2Fstable-queue.git fixes for 5.4 Signed-off-by: Sasha Levin --- diff --git a/queue-5.4/series b/queue-5.4/series new file mode 100644 index 00000000000..eaceec762fd --- /dev/null +++ b/queue-5.4/series @@ -0,0 +1 @@ +sparc32-fix-struct-ipc64_perm-type-definition.patch diff --git a/queue-5.4/sparc32-fix-struct-ipc64_perm-type-definition.patch b/queue-5.4/sparc32-fix-struct-ipc64_perm-type-definition.patch new file mode 100644 index 00000000000..73e911004f0 --- /dev/null +++ b/queue-5.4/sparc32-fix-struct-ipc64_perm-type-definition.patch @@ -0,0 +1,74 @@ +From 62882acabeec5deca854652f9baee8916143cbe8 Mon Sep 17 00:00:00 2001 +From: Sasha Levin +Date: Tue, 14 Jan 2020 14:26:14 +0100 +Subject: sparc32: fix struct ipc64_perm type definition + +From: Arnd Bergmann + +[ Upstream commit 34ca70ef7d3a9fa7e89151597db5e37ae1d429b4 ] + +As discussed in the strace issue tracker, it appears that the sparc32 +sysvipc support has been broken for the past 11 years. It was however +working in compat mode, which is how it must have escaped most of the +regular testing. + +The problem is that a cleanup patch inadvertently changed the uid/gid +fields in struct ipc64_perm from 32-bit types to 16-bit types in uapi +headers. + +Both glibc and uclibc-ng still use the original types, so they should +work fine with compat mode, but not natively. Change the definitions +to use __kernel_uid32_t and __kernel_gid32_t again. + +Fixes: 83c86984bff2 ("sparc: unify ipcbuf.h") +Link: https://github.com/strace/strace/issues/116 +Cc: # v2.6.29 +Cc: Sam Ravnborg +Cc: "Dmitry V . Levin" +Cc: Rich Felker +Cc: libc-alpha@sourceware.org +Signed-off-by: Arnd Bergmann +Signed-off-by: David S. Miller +Signed-off-by: Sasha Levin +--- + arch/sparc/include/uapi/asm/ipcbuf.h | 22 +++++++++++----------- + 1 file changed, 11 insertions(+), 11 deletions(-) + +diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h +index 9d0d125500e24..084b8949ddff6 100644 +--- a/arch/sparc/include/uapi/asm/ipcbuf.h ++++ b/arch/sparc/include/uapi/asm/ipcbuf.h +@@ -15,19 +15,19 @@ + + struct ipc64_perm + { +- __kernel_key_t key; +- __kernel_uid_t uid; +- __kernel_gid_t gid; +- __kernel_uid_t cuid; +- __kernel_gid_t cgid; ++ __kernel_key_t key; ++ __kernel_uid32_t uid; ++ __kernel_gid32_t gid; ++ __kernel_uid32_t cuid; ++ __kernel_gid32_t cgid; + #ifndef __arch64__ +- unsigned short __pad0; ++ unsigned short __pad0; + #endif +- __kernel_mode_t mode; +- unsigned short __pad1; +- unsigned short seq; +- unsigned long long __unused1; +- unsigned long long __unused2; ++ __kernel_mode_t mode; ++ unsigned short __pad1; ++ unsigned short seq; ++ unsigned long long __unused1; ++ unsigned long long __unused2; + }; + + #endif /* __SPARC_IPCBUF_H */ +-- +2.20.1 +