From patchwork Thu Feb 13 15:19:07 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: 183396 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp655088ile; Thu, 13 Feb 2020 07:23:33 -0800 (PST) X-Google-Smtp-Source: APXvYqy533g5cGlEqePn8tx1ELCbDC7vvZYij9feWuIP1Xe8Cj+4YgrJx2yRaeJ0fNmCIRAoXvFP X-Received: by 2002:a05:6830:18f6:: with SMTP id d22mr6834339otf.59.1581607413761; Thu, 13 Feb 2020 07:23:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581607413; cv=none; d=google.com; s=arc-20160816; b=iIFJ3zrAlaMIZk34STtyX49RXblSWVke01HClQ5ntcHIJwMVYgFEEwfU3/6K48U9Ox 9Sdt7PDCPQ11Or5sS/MOAJ0PJnfSjh0pHH8nqJdxl9nNBnV7AMyShEhYjKQLmvlaJB+O R4TCUxwtlsjzvXorY09+0ONKN/5O0ACj0QeMbCdQv4UoWhP0mTlrOLbG6ZOIesxKVBe7 3OI44N0EBSf81OPh2tNCvgSK7zfpZeoXdwiHwmyZLmzKLdKvlTvC5AAan0QfJB9DdXg+ 1ReJp8s7eBSiG1qRxiK06UQEW2l9cE0dsNr/tIepDUrPJso5O1c62ys9cyHnE44ddeJ0 NZYg== 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=NOZQOZLmitGdtDewxR6MUZZOPKUTzhpuXRBdbIDsRrJnD61wCTETF/oLZzVA/Acfrm TO56nzky2mO0qTn8I1SK9BID5puMSwVWPaG3RgaQ+88p9je4QlsPeenuwxqKmTjl9Tse dmAVTRk10x3vR5RgjFMbQv+uHa0RIyz7LODNvq00cYuW00WCFzcOxgMuR0hrqRr2Lh6b cC9RCCmdIsAn7A+8SaPOfMN1A9/5z5urzoWPVVfxKn8Ajs+iVYazsv/ugcK6StFopaiZ 5OKQdCwsOPfKCl74eNhU3VP0hipAmdqh8IsaMxvFj6a/tQ8Gn8QyfR6fs0jdRYC88LPJ 7CrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=EnKO7Pou; dkim=pass header.i=@kernel.org header.s=default header.b="Bg/M/ppe"; spf=pass (google.com: domain of libc-alpha-return-109670-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109670-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 y71si1384050oia.82.2020.02.13.07.23.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 07:23:33 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-109670-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=EnKO7Pou; dkim=pass header.i=@kernel.org header.s=default header.b="Bg/M/ppe"; spf=pass (google.com: domain of libc-alpha-return-109670-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109670-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=TV+83qtvJbPKqGxJbUZeujT8nlza2wS41hfhGQrOtBm AfP8/1/uofnbueHUQaequbK5F4hjWlMAHK1V6rRql7imHkX4iq/GQV+sqCfBfu9g URDFz43slHs0P9PtdOFrFcqSwXZifpQhq+x74WOvcevYIkY9inGAezgwOhYZqeaA = 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=EnKO7PouTCn1fDZQr MPesB40rFrRSqYf5Pzz6VR/f+V0JSko/tpIATOv8BtpJ7yi9jjoDTEBCrZpdmFYn SvF02Nrnwzuo4WnimdUeNDfcSS3qa+AGbOqM81P4c/CY2LEPfboWfwGGxwZk6+db mido6bNycU6pYCJXRxBL3sFTxw= Received: (qmail 2074 invoked by alias); 13 Feb 2020 15:23:25 -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 2064 invoked by uid 89); 13 Feb 2020 15:23:24 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy= X-HELO: mail.kernel.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581607402; bh=NdlLm7yWaw3LgbtsyqnOryAaYva9na4S5TGxCK5Z3bM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bg/M/pper9QeAIg8M7/TuTQdVM2IWryhIkfmuOhlDl70yhX6czZKIhJf1O3CrIisS x9DUtkNCEBDlfB+R8UogFMOmZB6DrVDUl+k/HwmgWrvriJqb49LZXtWJf9YRJdY9ah DCDJ8twrp2vUTPKAFtc5hOibCwPLbYjDucdnWFEg= 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.9 003/116] sparc32: fix struct ipc64_perm type definition Date: Thu, 13 Feb 2020 07:19:07 -0800 Message-Id: <20200213151843.796428293@linuxfoundation.org> In-Reply-To: <20200213151842.259660170@linuxfoundation.org> References: <20200213151842.259660170@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 */