From: Masahiro Yamada <masahiroy@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Carlos Llamas <cmllamas@google.com>,
Christopher Ferris <cferris@google.com>,
Todd Kjos <tkjos@android.com>,
linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Paul Mackerras <paulus@samba.org>,
linuxppc-dev@lists.ozlabs.org
Subject: [PATCH 2/3] powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
Date: Thu, 2 Jun 2022 03:19:40 +0900 [thread overview]
Message-ID: <20220601181941.3706832-3-masahiroy@kernel.org> (raw)
In-Reply-To: <20220601181941.3706832-1-masahiroy@kernel.org>
Commit c01013a2f8dd ("powerpc: add asm/stat.h to UAPI compile-test
coverage") converted as follows:
uid_t --> __kernel_uid_t
gid_t --> __kernel_gid_t
The bit width of __kernel_{uid,gid}_t is 16 or 32-bits depending on
architectures.
PPC uses 32-bits for them as in include/uapi/asm-generic/posix_types.h,
so the previous conversion is probably fine, but let's stick to the
arch-independent conversion just in case.
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: c01013a2f8dd ("powerpc: add asm/stat.h to UAPI compile-test coverage")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/powerpc/include/uapi/asm/stat.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/include/uapi/asm/stat.h b/arch/powerpc/include/uapi/asm/stat.h
index a28c9a1201fa..d50901664239 100644
--- a/arch/powerpc/include/uapi/asm/stat.h
+++ b/arch/powerpc/include/uapi/asm/stat.h
@@ -37,8 +37,8 @@ struct stat {
__kernel_mode_t st_mode;
unsigned short st_nlink;
#endif
- __kernel_uid_t st_uid;
- __kernel_gid_t st_gid;
+ __kernel_uid32_t st_uid;
+ __kernel_gid32_t st_gid;
unsigned long st_rdev;
long st_size;
unsigned long st_blksize;
--
2.32.0
next prev parent reply other threads:[~2022-06-01 18:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-01 18:19 [PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t Masahiro Yamada
2022-06-01 18:19 ` [PATCH 1/3] mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h Masahiro Yamada
2022-06-01 18:19 ` Masahiro Yamada [this message]
2022-06-01 18:19 ` [PATCH 3/3] sparc: fix mis-use of __kernel_{uid,gid}_t " Masahiro Yamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220601181941.3706832-3-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=cferris@google.com \
--cc=cmllamas@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=tkjos@android.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).