From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BD00C2BA83 for ; Thu, 13 Feb 2020 16:11:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D3A5220656 for ; Thu, 13 Feb 2020 16:11:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581610284; bh=NdlLm7yWaw3LgbtsyqnOryAaYva9na4S5TGxCK5Z3bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=PO0mSfvcjvM8XYonB+pQkU71ge63GztFkXJLFcTQBWSGrnyPVykl3B3KgdJf2hwNj RJWZ+unsq/RYPw+A2iFE2tiDjpkG8QNQvEhUXa9pW7qtA0im1oGH6NiBTJ3d1eIQBs 6PYiN+napYORbw/Nf8LRMzUv3UFuB0AU9pMSRroM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729613AbgBMQLY (ORCPT ); Thu, 13 Feb 2020 11:11:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:59526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727860AbgBMPWY (ORCPT ); Thu, 13 Feb 2020 10:22:24 -0500 Received: from localhost (unknown [104.132.1.104]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9969C24699; Thu, 13 Feb 2020 15:22:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607343; bh=NdlLm7yWaw3LgbtsyqnOryAaYva9na4S5TGxCK5Z3bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=a8w1rLyd1D/RfAU0+lC0/Fh93T04mIPSZ+wYWzG9Lmh4vL85uInXmATDxtP47aomZ sZnilCoTbGL6FUGJE6Gf5Ds6CzFurXnFmABa+mdiz/RMOLgYFIFdCBJg0ibWBMfEPw HwQusfktVODZrEPlzF+mLJqREG1QdKYqYjqkMe88= 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.4 03/91] sparc32: fix struct ipc64_perm type definition Date: Thu, 13 Feb 2020 07:19:20 -0800 Message-Id: <20200213151822.586392184@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200213151821.384445454@linuxfoundation.org> References: <20200213151821.384445454@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 66013b4fe10d5..58da9c4addb2d 100644 --- a/arch/sparc/include/uapi/asm/ipcbuf.h +++ b/arch/sparc/include/uapi/asm/ipcbuf.h @@ -14,19 +14,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