From patchwork Thu Feb 13 15:18:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 183397 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp656339ile; Thu, 13 Feb 2020 07:24:48 -0800 (PST) X-Google-Smtp-Source: APXvYqyY6F+wxcpBBwUdBaZD4sJ+4QL5w3NL6DQR9YpqCwpZqHvP/3bFdOPLHAjSCo/LmZBYMUlf X-Received: by 2002:a05:6830:1608:: with SMTP id g8mr13137006otr.169.1581607488467; Thu, 13 Feb 2020 07:24:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581607488; cv=none; d=google.com; s=arc-20160816; b=RdxxkuWpV2+VdRb75liLkrL2fj8M5P8hnnIrT62IvRQV2uZm4IU2pucDRPYl0YxOVJ vyVg4EalJd0RuOMAfRntMuTe7BY6coU5vscGFurPWblFEYa0SQZu2buJ1JeraupJaUk8 18DybSThOHIziQ4+wCguRr8a97yz8QSHE7vnSsrskOQW28JO0NzWd9+7r/IXhBkNKPwH JSEozKG2l4buVlnR72rFnlfpsrk3XmOstcxpxb+re8JWQErIaoLVFrbbBsQ2tLxf8wE/ orj/mKmgEyRAAu1zFC4Q/BTczWJodecr0LtPC2nCv0VTtOiflWYg0sd3cEL0qKoWjwbd aK/g== 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=9jyQ19mnfEy6nLqGxmEk4shNO7ii77nymvgsTYkjeSk=; b=S8FsbmTPuW6Xw8uo6Muu539d41kJP6h7yR5Vev4DV8yWM95UlPGJ65DpgTcbIPXlLA Ma02PreQU3C4RoPS3WHRDJw9H4N5ZnyKHv93GpxXlP28uZ49menVqbfAoKWwhwHXujC7 WJmA1E37wEqjVUrg5T89bp+xAl2ivB+iUJI+AJF4e9x+0Dj81WRGpOMFlh70d0L99TaM jgMzfhaGG0eNFiTq5CKtY/s1b3zZ7chVxuYvGcJKklgdbjQ50owthd/v6rOlDT6aKqUO uQxfjIU/H8Y7GGTgthKk43MdqqEvnHRY1FqtXWmtNDDi31ZbcobV4/TEVVsoiuS817ps VtFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=LMsaVEQd; dkim=pass header.i=@kernel.org header.s=default header.b=vquVU+SF; spf=pass (google.com: domain of libc-alpha-return-109671-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109671-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 v18si1249061otq.209.2020.02.13.07.24.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Feb 2020 07:24:48 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-109671-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=LMsaVEQd; dkim=pass header.i=@kernel.org header.s=default header.b=vquVU+SF; spf=pass (google.com: domain of libc-alpha-return-109671-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-109671-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=j/rAPP5IbLT2Uda8D2o/w7YRk//6ostQkJmM8PNgwC7 3li+Tbo1360O7RPiKHhSC1IvzKigwPp0CB3uS6RRwhCE2yHhvEDmUbE2G/5rIduw dgGJHaT0iQWdbRKU9WSI/B/JiFiQ4oxRlGjxANw3VRUt2ZbqIwzyj0XJB/ao54oQ = 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=Wu1GvOG1puOm/wetGk+6NKwaFss=; b=LMsaVEQdnU5KHuzWe NJ0N9ecVtZOBMcLgctXUAOOnkws5QxieyZAiyrW9a9jtDsdQltqe9OJeEK92NJ00 9WiywklYvKQn6i9uYPh61EmxwElNI0jpvht8390AZqPBANy2pvop2dXVNbdLFtJf kUz7wv8ndqRKK+uE6ha90N9Rb8= Received: (qmail 16244 invoked by alias); 13 Feb 2020 15:24:38 -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 16201 invoked by uid 89); 13 Feb 2020 15:24:37 -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, SPF_PASS 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=1581607474; bh=IhO7+4+gxU3KVcljasvSNdPaZ+h364bd1dgtWTohQgo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vquVU+SFQ/x3SEfBoUw1czvL0BsRsBBq7pvLrD+X+Wgp6MqRPSJnn2NO0VaE/Ruuh SbbHFFKjCromq5xBiAHDq9xIEQ6+HBR9EfTQhEybyrW82NgRUg/c3sf+5A9XhriHvk BwEKmgJpvJgRqp/w+L+uTxPyhP439bxt3qbzRem0= 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.14 005/173] sparc32: fix struct ipc64_perm type definition Date: Thu, 13 Feb 2020 07:18:28 -0800 Message-Id: <20200213151933.560566397@linuxfoundation.org> In-Reply-To: <20200213151931.677980430@linuxfoundation.org> References: <20200213151931.677980430@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 9d0d125500e24..084b8949ddff6 100644 --- 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 */