From patchwork Mon Feb 10 12:31:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 183248 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp4013825ile; Mon, 10 Feb 2020 04:35:09 -0800 (PST) X-Google-Smtp-Source: APXvYqxXy8S/swwtS876UHReBie4pr70xUYyO5wToMo61eCk4s4seQYHpkUOuwyS1JLzoy1ocSTO X-Received: by 2002:aca:c646:: with SMTP id w67mr636517oif.171.1581338109387; Mon, 10 Feb 2020 04:35:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581338109; cv=none; d=google.com; s=arc-20160816; b=jif4a2E9OvTMRM82YV7PlnhI84Ni5S0n/0Le93nU8FMD9nf9UNeLlYrK3Esi/qvaQ4 WzJlECp/0sE7UAyCCMUJAVQ/ZqJLWsm9f70gixvSbn5OI+oUWbF45jTq2BiJlHWeYcUx SPQbRBs8uT2zvsNHuOgZDO9vWZtmpqpZy1Xn8fnYo7VV+O2urJXp6i5Qi5XWudAO3KxY 1qNk3elqYLtswb4n310fOjVnKADMod3bd6A1tHN0SiCqyoNC2ngVbYubTzkBIlfHCjMs a0953LCJaGeoJ/ncpSQOEpMdVhwQnNFNZPHayrInRiETepRKtfAMQ/ySuq+UjRrfRPT3 T2yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=eN3FvMVYfEkeHviWrzzqAgsFzvr1QVD7cfLfejCXO/s=; b=00QH4OIIGpRJ6Yrt/Y0tzmC1HmSMkxKReWXrbbvj3takqtZ8xCybgfCYaXgrE0Diq3 kFgPhMPDp8xBPny0H++2LU59AnSsoBPt+xuS92plV+uDq9vWbuw3pEUPOw0qeaBdYJkT VVRXrfwGyjJQWfiYupPZHH2fGbMXsJDuyQUlOGweO7Mg9ELriRtFZ3i3aABb1UefMwWP mtrefjlhGiWn585MFnU4RQZtlkvUZlBJDqlaK+lE8ewxm0MUwRFIm7uVmWrIAHjVmrHE RJAcf1shkFctZSvlB3m4K+sObspWzVNrIoBfzTO8cVODeOd9y6qNN5edr5MyIhlmLZw7 Jg0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=wwOxaXpd; dkim=pass header.i=@kernel.org header.s=default header.b=LTyGjSNr; spf=pass (google.com: domain of libc-alpha-return-109358-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109358-patch=linaro.org@sourceware.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id e17si146654oti.136.2020.02.10.04.35.09 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 10 Feb 2020 04:35:09 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-109358-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=wwOxaXpd; dkim=pass header.i=@kernel.org header.s=default header.b=LTyGjSNr; spf=pass (google.com: domain of libc-alpha-return-109358-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109358-patch=linaro.org@sourceware.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; q=dns; s=default; b=JTuy0mhbuLhFjD7/UwvAUOFAuVLVPLGKBY73irm0NV9 NwxL11yc8cqvUnOvTUIdPlEAeWagxhKs5qAJs/EbogGfI9wVjRi52vmZm/PjwdvZ adbkvoQGXCaSMnCYgWfKk69SIgmcpB5/9GD9dAdTaX2Ck/XeuMDA+lKPNYjcMfDc = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; s=default; bh=3/2pHVMID2y+AAprpz1vraTAEjs=; b=wwOxaXpd2a2zzO3+p 7nim/OomnEj6rWF6sd00eWqkGnDp0TcG+Q5VKOy1lBIbOKT7tZIBbV4w6wqZ+rp7 vVRlRc4dhbgu69Zq1l+zBNFBmNpgV1BLGXVRBzWUh3p1eb1jcUD51ZqEt0XrqRlU k3Qhvumwwf0NVSCFZHtPAN1D98= Received: (qmail 59454 invoked by alias); 10 Feb 2020 12:35:00 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59444 invoked by uid 89); 10 Feb 2020 12:35:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=Sam, U*sam, HContent-Transfer-Encoding:8bit X-HELO: mail.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581338097; bh=AQQYmQMpY/SeDz5/CsK3sUYLrw9DbtZY/6lH9zEyOU4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LTyGjSNrxFUsacglNo/fJ2r6k2Pz/XwusT2OX4pBTD+9hGWElitzoZ2Qj/HIB/u3i uwXkj+WRnu2h6pXRA9ymj8n1ZlCrQF6XQt+/ZJqERa0U+pCQMTae3oAY6qu1T7isXG EfUWq46XGLk59UI8R4mgZGSHwcE57t8zuDJ+oOHQ= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Sam Ravnborg , "Dmitry V . Levin" , Rich Felker , libc-alpha@sourceware.org, Arnd Bergmann , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 010/195] sparc32: fix struct ipc64_perm type definition Date: Mon, 10 Feb 2020 04:31:08 -0800 Message-Id: <20200210122306.779089932@linuxfoundation.org> In-Reply-To: <20200210122305.731206734@linuxfoundation.org> References: <20200210122305.731206734@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 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(-) --- 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 */