From patchwork Wed Jun 1 18:19:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 1638107 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=TrhCoTXN; dkim-atps=neutral Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4LCyPZ5JPVz9s0r for ; Thu, 2 Jun 2022 04:30:26 +1000 (AEST) Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LCyPZ3Ct6z4xD2 for ; Thu, 2 Jun 2022 04:30:26 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4LCyPZ39pbz4xDK; Thu, 2 Jun 2022 04:30:26 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=sparclinux-owner@vger.kernel.org; receiver=) Authentication-Results: gandalf.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=nifty.com header.i=@nifty.com header.a=rsa-sha256 header.s=dec2015msa header.b=TrhCoTXN; dkim-atps=neutral Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4LCyPZ35ndz4xD2 for ; Thu, 2 Jun 2022 04:30:26 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230089AbiFASaY (ORCPT ); Wed, 1 Jun 2022 14:30:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229871AbiFASaX (ORCPT ); Wed, 1 Jun 2022 14:30:23 -0400 X-Greylist: delayed 215 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 01 Jun 2022 11:30:22 PDT Received: from condef-01.nifty.com (condef-01.nifty.com [202.248.20.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEBCC6C54F for ; Wed, 1 Jun 2022 11:30:22 -0700 (PDT) Received: from conuserg-07.nifty.com ([10.126.8.70])by condef-01.nifty.com with ESMTP id 251ILWsX004031 for ; Thu, 2 Jun 2022 03:21:32 +0900 Received: from grover.sesame (133-32-177-133.west.xps.vectant.ne.jp [133.32.177.133]) (authenticated) by conuserg-07.nifty.com with ESMTP id 251IJkAT014364; Thu, 2 Jun 2022 03:19:50 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-07.nifty.com 251IJkAT014364 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1654107590; bh=DfGX9X9js5EY/zBCax8VTjZW98hEg7RezVbzqZYSm80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TrhCoTXNyAtPJa6Y2ejgBAgPaoUU7j4Z5bIlZUgcrwGbF7sziHBowTEPAW0FSU/8B jlK60LFQOvNd01klVlgxiRlTHim6jeyWqWarpqj4R75RoH1FAZu0ml7sXHv3bJ/V1K QRcm16WRYwCivH2VtJfXJ6ICEbrSzotkkAcFrqpAouiFa77VqQ0oVObzvheDql1XUS pJDGvMo90/aeJozhby91dsaznEnp0Smq5NjtMfJyR9BJFyNssCNbDzfEjf9oVNsn26 ymlSjknZNbJWPOytAtzl3N8eigmyNp5XB0bKapapxwpgmHz5Jmsc66AKtyqrmEPer9 FO/tD4mccBNnw== X-Nifty-SrcIP: [133.32.177.133] From: Masahiro Yamada To: Arnd Bergmann Cc: Carlos Llamas , Christopher Ferris , Todd Kjos , linux-kernel@vger.kernel.org, Masahiro Yamada , "David S. Miller" , sparclinux@vger.kernel.org Subject: [PATCH 3/3] sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h Date: Thu, 2 Jun 2022 03:19:41 +0900 Message-Id: <20220601181941.3706832-4-masahiroy@kernel.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220601181941.3706832-1-masahiroy@kernel.org> References: <20220601181941.3706832-1-masahiroy@kernel.org> MIME-Version: 1.0 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_SOFTFAIL, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: sparclinux@vger.kernel.org Commit 31a088b664d6 ("sparc: add asm/stat.h to UAPI compile-test coverage") converted as follows: uid_t --> __kernel_uid_t gid_t --> __kernel_gid_t It changed the field widths of struct stat because Sparc uses 16-bits for ___kernel_{uid,gid}_t as in arch/sparc/include/uapi/asm/posix_types.h. The safe replacements across all architectures are: uid_t --> __kernel_uid32_t gid_t --> __kernel_gid32_t as defined in include/linux/types.h. A similar issue was reported for the android binder. [1] [1]: https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/ Fixes: 31a088b664d6 ("sparc: add asm/stat.h to UAPI compile-test coverage") Signed-off-by: Masahiro Yamada --- arch/sparc/include/uapi/asm/stat.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/sparc/include/uapi/asm/stat.h b/arch/sparc/include/uapi/asm/stat.h index e03d6f8ec301..47f54133a141 100644 --- a/arch/sparc/include/uapi/asm/stat.h +++ b/arch/sparc/include/uapi/asm/stat.h @@ -11,8 +11,8 @@ struct stat { __kernel_ino_t st_ino; __kernel_mode_t st_mode; short st_nlink; - __kernel_uid_t st_uid; - __kernel_gid_t st_gid; + __kernel_uid32_t st_uid; + __kernel_gid32_t st_gid; unsigned int st_rdev; long st_size; long st_atime;