* [PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t
@ 2022-06-01 18:19 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Thomas Bogendoerfer, Todd Kjos, Masahiro Yamada, Carlos Llamas,
linux-kernel, Paul Mackerras, Christopher Ferris, sparclinux,
linux-mips, linuxppc-dev, David S. Miller
I accidentally broke android binder.h:
https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/
I checked my previous conversions, and found some more.
(at least, the sparc one seems fatal.)
Masahiro Yamada (3):
mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h
arch/mips/include/uapi/asm/stat.h | 12 ++++++------
arch/powerpc/include/uapi/asm/stat.h | 4 ++--
arch/sparc/include/uapi/asm/stat.h | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t
@ 2022-06-01 18:19 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Carlos Llamas, Christopher Ferris, Todd Kjos, linux-kernel,
Masahiro Yamada, Benjamin Herrenschmidt, David S. Miller,
Michael Ellerman, Paul Mackerras, Thomas Bogendoerfer,
linux-mips, linuxppc-dev, sparclinux
I accidentally broke android binder.h:
https://lore.kernel.org/all/20220601010017.2639048-1-cmllamas@google.com/
I checked my previous conversions, and found some more.
(at least, the sparc one seems fatal.)
Masahiro Yamada (3):
mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h
arch/mips/include/uapi/asm/stat.h | 12 ++++++------
arch/powerpc/include/uapi/asm/stat.h | 4 ++--
arch/sparc/include/uapi/asm/stat.h | 4 ++--
3 files changed, 10 insertions(+), 10 deletions(-)
--
2.32.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] mips: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
2022-06-01 18:19 ` Masahiro Yamada
(?)
@ 2022-06-01 18:19 ` Masahiro Yamada
-1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Carlos Llamas, Christopher Ferris, Todd Kjos, linux-kernel,
Masahiro Yamada, Thomas Bogendoerfer, linux-mips
Commit 8c1a381a4fbb ("mips: 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.
MIPS 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: 8c1a381a4fbb ("mips: add asm/stat.h to UAPI compile-test coverage")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
arch/mips/include/uapi/asm/stat.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/mips/include/uapi/asm/stat.h b/arch/mips/include/uapi/asm/stat.h
index 8a8bb78883a4..aaccdc61be74 100644
--- a/arch/mips/include/uapi/asm/stat.h
+++ b/arch/mips/include/uapi/asm/stat.h
@@ -22,8 +22,8 @@ struct stat {
__kernel_ino_t st_ino;
__kernel_mode_t st_mode;
__u32 st_nlink;
- __kernel_uid_t st_uid;
- __kernel_gid_t st_gid;
+ __kernel_uid32_t st_uid;
+ __kernel_gid32_t st_gid;
unsigned st_rdev;
long st_pad2[2];
long st_size;
@@ -58,8 +58,8 @@ struct stat64 {
__kernel_mode_t st_mode;
__u32 st_nlink;
- __kernel_uid_t st_uid;
- __kernel_gid_t st_gid;
+ __kernel_uid32_t st_uid;
+ __kernel_gid32_t st_gid;
unsigned long st_rdev;
unsigned long st_pad1[3]; /* Reserved for st_rdev expansion */
@@ -99,8 +99,8 @@ struct stat {
__kernel_mode_t st_mode;
__u32 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;
unsigned int st_pad1[3]; /* Reserved for st_rdev expansion */
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
2022-06-01 18:19 ` Masahiro Yamada
@ 2022-06-01 18:19 ` Masahiro Yamada
-1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Todd Kjos, Masahiro Yamada, Carlos Llamas, linux-kernel,
Paul Mackerras, Christopher Ferris, linuxppc-dev
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/3] powerpc: use __kernel_{uid,gid}32_t in uapi/asm/stat.h
@ 2022-06-01 18:19 ` Masahiro Yamada
0 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Carlos Llamas, Christopher Ferris, Todd Kjos, linux-kernel,
Masahiro Yamada, Benjamin Herrenschmidt, Michael Ellerman,
Paul Mackerras, linuxppc-dev
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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] sparc: fix mis-use of __kernel_{uid,gid}_t in uapi/asm/stat.h
2022-06-01 18:19 ` Masahiro Yamada
` (2 preceding siblings ...)
(?)
@ 2022-06-01 18:19 ` Masahiro Yamada
-1 siblings, 0 replies; 6+ messages in thread
From: Masahiro Yamada @ 2022-06-01 18:19 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Carlos Llamas, Christopher Ferris, Todd Kjos, linux-kernel,
Masahiro Yamada, David S. Miller, sparclinux
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 <masahiroy@kernel.org>
---
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;
--
2.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-01 18:22 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 18:19 [PATCH 0/3] asm-generic: fix misconversion of {uid,gid}_t Masahiro Yamada
2022-06-01 18:19 ` 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 ` [PATCH 2/3] powerpc: " Masahiro Yamada
2022-06-01 18:19 ` Masahiro Yamada
2022-06-01 18:19 ` [PATCH 3/3] sparc: fix mis-use of __kernel_{uid,gid}_t " Masahiro Yamada
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.