From patchwork Tue Jan 14 13:26:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 182825 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp5504331ile; Tue, 14 Jan 2020 05:27:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyKYCBHgq9OUFrYVwVPhjfllnwJI9F+WcGsovPvdRp/rvms8uoxvIfZLT1ZSbBdzD4TAFXS X-Received: by 2002:a9d:65cb:: with SMTP id z11mr15819059oth.348.1579008457258; Tue, 14 Jan 2020 05:27:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579008457; cv=none; d=google.com; s=arc-20160816; b=0bYe/8QCtGfs/QiNDI7pFOmXkdw0Z+1M3QGVrV1HQypZppVS7g9pvsdwhF3Tb0cdOu KCAFH4CMfsEqq1BfhX3XoPxxYAe80G2wcXJaLvSzyoml2WFMtjD/f/DeaQlGblkMpTyv HrCXvbF6StZhb+Q5mBM1ELY2jMIAlJo0PvFspBBhyya05kKWBPTr2RtX2xcirTtJWPY+ ze3NMhJwP5RH0PDKpcS6727Ph7vfB9jmyYh4lTDztQKGW8CTSugPrFXnKRcXZnQRcKGJ oHDPwEJHcu9pOUF5pmeNAQrk40W5Hj2xgfVdKvtw2ck4NeDihbcmdJ/XExsE806/K2bN Bfmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=hHyuJmXVduqIfPICE4zv6dRyviyKWjQwlVRhFHJPUsg=; b=qiSlAtV4hyC8oCQ9YMWrYfzeQkICy1CEWxLaAPBzF83pf3evyIiZ9gBMO/hLzw20aa rTa+yHG2ozVwQOuEOu9z/fbQriIpD8f4YqyB3K7ParjEBMRILU39abfxRrUVp3AqSt0X ylOIl1cAJqYdltuK4mxQQ9Pbcp4jH/CoED0eSYri6//FZnfowDI+dGZMKDAw8ZM9iBtV q+afF1g0nL0y73bTCKFOWfJSUjtrY4MVlWAwoJ45NurWpwdOtn7nMIHG75HM8uKM9NwP e9Yute3imFKpWLlDNGVLvue/44vLqp4yVfxop1U1DqCoASlgTfJHtam3/GkN7RMs6GJ3 qp4Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=cFoQKr32; spf=pass (google.com: domain of libc-alpha-return-108660-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-108660-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 v21si10900194otf.87.2020.01.14.05.27.36 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jan 2020 05:27:37 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-108660-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=cFoQKr32; spf=pass (google.com: domain of libc-alpha-return-108660-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-108660-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 :mime-version:content-transfer-encoding; q=dns; s=default; b=Auw 7QKI2AxCGcHcfoXku3+bX3bf8kEAr6HngTtZPUGIOCjbHmQ66zCiNg6FK7Bs4TqK A6KtEG2BrgFIMUxK1LNn7dU4++kgt9WhGpJyLjqGADQFv9HtoK5BU+DeIWFS8k4D AZEe/gJurrtMRYGnQlA2CuXgOrIo9PHn4hxmU6nQ= 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 :mime-version:content-transfer-encoding; s=default; bh=J5+L5KrCS 2/MTxrbcr1pPVVu/O0=; b=cFoQKr32O0xgp+wNqDAk3WbVPomzYat4acVjSpHpQ ykagcyB1n/Z1Tx10EofS3+h+wzPUV2Sm3C1Tf8dCLAKhz9Y2h1IlE1aOWtS8F+UY 1gXNLSh0v0YCYKdrDNmbyx/GsavH1XhDHzw20NvS9hV1Fe8KUx8DXxW1+v9Fe5vb nI= Received: (qmail 103756 invoked by alias); 14 Jan 2020 13:27:27 -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 103731 invoked by uid 89); 14 Jan 2020 13:27:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-14.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: mout.kundenserver.de From: Arnd Bergmann To: "David S. Miller" , Sam Ravnborg Cc: Arnd Bergmann , stable@vger.kernel.org, "Dmitry V . Levin" , Rich Felker , libc-alpha@sourceware.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] sparc32: fix struct ipc64_perm type definition Date: Tue, 14 Jan 2020 14:26:14 +0100 Message-Id: <20200114132633.3694261-1-arnd@arndb.de> MIME-Version: 1.0 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 --- arch/sparc/include/uapi/asm/ipcbuf.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) -- 2.20.0 diff --git a/arch/sparc/include/uapi/asm/ipcbuf.h b/arch/sparc/include/uapi/asm/ipcbuf.h index 5b933a598a33..0ea1240d2ea1 100644 --- a/arch/sparc/include/uapi/asm/ipcbuf.h +++ b/arch/sparc/include/uapi/asm/ipcbuf.h @@ -17,19 +17,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 */