From patchwork Thu Feb 13 15:19:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 183395 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp654142ile; Thu, 13 Feb 2020 07:22:35 -0800 (PST) X-Google-Smtp-Source: APXvYqzIpWNsf3tpyEyEFFlzxVET6n7FtAveLZ8YO/znaVKnhNXGFfibUaFbvfIL5hSoTySOB8tD X-Received: by 2002:a9d:6e8f:: with SMTP id a15mr13503850otr.178.1581607355875; Thu, 13 Feb 2020 07:22:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581607355; cv=none; d=google.com; s=arc-20160816; b=UHmqr/zdbsOuI+6KDAB99H+SNK8U6+uNDo3iywOzXTTz7rlQRbC7bxFod/MIP8u3xN 4ZKCZkA95qxQkV4opsJzYdjGXMZrZQzvupfZF3E9ecQGq9/Mefr3gKKjEw39+gLF1iZf 0pWS6Hxe4De45nwMwLGNRT1AtXuXhZQGblUHlf487BzXTNKAwJC587Vsx3nmxl56l7fQ 5iV3OCtsshXSBoqpBGyaDY16cC9QrfqL3IZSsqcPoxsevElBGLmf7ZK5t1ANWWKY9wKS mI4nLVVOpIIfYJIzUZiw/dYfaKOJMGMyneFUkU21dP6LKgyQLn3l2enFHl4fYZDgJ/Z3 s/hg== 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=sqzCfIKVqnGiW6k2KbBzDgicCYljcWBRk6yMiLpiBAU=; b=AGY9SrVnxOkUNzE9OlpLkT/KNIP7cNt1O4/dC9fwJUpjtq2UGQoLGJYaYpNzB8NXH3 LT5eQLLSSBjv1AxJr6AZ/6RSzX8v4gEZqodG0jFmGEIK7QX0IhMzAKh6Ty1orQY51DTp 9gxuP6WZaoKOclYJt+bLIz7jegTFIEue5boqwPILMAZA1v90SA+mMbykw5JLobFE1fqU kP8o+OPpzmxDa6fzXFoHPUghMrMd1nOI9ibnZTH/gLz5j6FfX+7peweCIUZH1agbawfu FRe3sk14VwW3tc3c0X5ezHo+v2JyLj7edSu8FJ4DlNQvekywCVPRGe7lR9Y15iOFVRTT Q95w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=uiCR4UIT; dkim=pass header.i=@kernel.org header.s=default header.b=a8w1rLyd; spf=pass (google.com: domain of libc-alpha-return-109669-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109669-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 d20si1201290oti.311.2020.02.13.07.22.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 07:22:35 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-109669-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=uiCR4UIT; dkim=pass header.i=@kernel.org header.s=default header.b=a8w1rLyd; spf=pass (google.com: domain of libc-alpha-return-109669-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109669-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=WYlpLbOEbG4luQ6KA6A+szTWyZBaHIGLLo6w10YNyYS b+AJmsdjz7Qhnk5rFjeCJ12FlbQQrkOOHPKqC0UiuOk8RhGM/2MXrJBLl5QLzP1C TtUg/6Y0pLg0PRF4D6fMElUpkBuOxN4ADRAUq9n7Uqs3JCh9n7tqz5UWJ6K45N5E = 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=5fV83up/38LvaZSBHC6CkKFBcAo=; b=uiCR4UIT9kPu0hiRy bpKUaUAn6u1nfkS44W8oaSZZ5LMgbD8ZRqUI0jVtJtJ2MhVcEMLEm/tk9mgktNW7 Apcn9HLFrqM5HoUpNgiTwW/a4erB4MPCPHCj/dbRaoPKyGjQP2S1UpiiUEUKFJZX CKSySGrGJJW0WZEjPbZQQqE0Is= Received: (qmail 542 invoked by alias); 13 Feb 2020 15:22:26 -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 529 invoked by uid 89); 13 Feb 2020 15:22:26 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=escaped, miller, 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=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> In-Reply-To: <20200213151821.384445454@linuxfoundation.org> References: <20200213151821.384445454@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(-) -- 2.20.1 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 */