From: David Miller <davem@davemloft.net>
To: stable@vger.kernel.org
Subject: [PATCH] Sparc
Date: Wed, 05 Feb 2020 15:11:10 +0100 (CET) [thread overview]
Message-ID: <20200205.151110.999222765422116817.davem@davemloft.net> (raw)
[-- Attachment #1: Type: Text/Plain, Size: 65 bytes --]
Please queue up the attached sparc bug fix for -stable, thanks!
[-- Attachment #2: 0001-sparc32-fix-struct-ipc64_perm-type-definition.patch --]
[-- Type: Text/X-Patch, Size: 2233 bytes --]
From 34ca70ef7d3a9fa7e89151597db5e37ae1d429b4 Mon Sep 17 00:00:00 2001
From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 14 Jan 2020 14:26:14 +0100
Subject: [PATCH] sparc32: fix struct ipc64_perm type definition
[ 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: <stable@vger.kernel.org> # v2.6.29
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: "Dmitry V . Levin" <ldv@altlinux.org>
Cc: Rich Felker <dalias@libc.org>
Cc: libc-alpha@sourceware.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
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 9d0d125500e2..084b8949ddff 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.21.1
next reply other threads:[~2020-02-05 14:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-05 14:11 David Miller [this message]
2020-02-06 4:54 ` [PATCH] Sparc Sasha Levin
2020-02-06 6:49 ` Greg KH
-- strict thread matches above, loose matches on Subject: below --
2019-06-03 20:38 David Miller
2019-06-04 7:48 ` Greg KH
2018-05-22 17:51 David Miller
2018-05-22 18:13 ` Greg KH
2018-04-13 17:23 David Miller
2018-04-13 17:38 ` David Miller
2018-04-14 14:05 ` Greg KH
2018-01-01 3:36 David Miller
2018-01-01 10:06 ` Greg KH
2017-11-20 11:53 David Miller
2017-11-20 20:08 ` Greg KH
2017-08-24 3:25 David Miller
2017-08-25 0:41 ` Greg KH
2017-05-11 2:42 David Miller
2017-05-11 8:36 ` Greg KH
2015-07-03 22:32 [PATCH] SPARC David Miller
2015-07-04 2:57 ` Greg KH
2015-07-09 13:40 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200205.151110.999222765422116817.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.