* [PATCH] binder: fix sender_euid type in uapi header
@ 2022-06-01 1:00 Carlos Llamas
2022-06-01 16:52 ` Masahiro Yamada
0 siblings, 1 reply; 3+ messages in thread
From: Carlos Llamas @ 2022-06-01 1:00 UTC (permalink / raw)
To: Arnd Bergmann, Masahiro Yamada, Greg Kroah-Hartman, Todd Kjos
Cc: kernel-team, linux-kernel, Carlos Llamas, Christopher Ferris
The {pid,uid}_t fields of struct binder_transaction were recently
replaced to use kernel types in commit 169adc2b6b3c ("android/binder.h:
add linux/android/binder(fs).h to UAPI compile-test coverage").
However, using __kernel_uid_t here breaks backwards compatibility in
architectures using 16-bits for this type, since glibc and some others
still expect a 32-bit uid_t. Instead, let's use __kernel_uid32_t which
avoids this compatibility problem.
Fixes: 169adc2b6b3c ("android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage")
Reported-by: Christopher Ferris <cferris@google.com>
Signed-off-by: Carlos Llamas <cmllamas@google.com>
---
include/uapi/linux/android/binder.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
index 11157fae8a8e..688bcdaeed53 100644
--- a/include/uapi/linux/android/binder.h
+++ b/include/uapi/linux/android/binder.h
@@ -289,7 +289,7 @@ struct binder_transaction_data {
/* General information about the transaction. */
__u32 flags;
__kernel_pid_t sender_pid;
- __kernel_uid_t sender_euid;
+ __kernel_uid32_t sender_euid;
binder_size_t data_size; /* number of bytes of data */
binder_size_t offsets_size; /* number of bytes of offsets */
--
2.36.1.255.ge46751e96f-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] binder: fix sender_euid type in uapi header
2022-06-01 1:00 [PATCH] binder: fix sender_euid type in uapi header Carlos Llamas
@ 2022-06-01 16:52 ` Masahiro Yamada
2022-06-01 17:35 ` Todd Kjos
0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2022-06-01 16:52 UTC (permalink / raw)
To: Carlos Llamas
Cc: Arnd Bergmann, Greg Kroah-Hartman, Todd Kjos, Cc: Android Kernel,
Linux Kernel Mailing List, Christopher Ferris
On Wed, Jun 1, 2022 at 10:00 AM Carlos Llamas <cmllamas@google.com> wrote:
>
> The {pid,uid}_t fields of struct binder_transaction were recently
> replaced to use kernel types in commit 169adc2b6b3c ("android/binder.h:
> add linux/android/binder(fs).h to UAPI compile-test coverage").
>
> However, using __kernel_uid_t here breaks backwards compatibility in
> architectures using 16-bits for this type, since glibc and some others
> still expect a 32-bit uid_t. Instead, let's use __kernel_uid32_t which
> avoids this compatibility problem.
>
> Fixes: 169adc2b6b3c ("android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage")
> Reported-by: Christopher Ferris <cferris@google.com>
> Signed-off-by: Carlos Llamas <cmllamas@google.com>
> ---
Ahhh, good catch.
Thank you for fixing this!
Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
> include/uapi/linux/android/binder.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
> index 11157fae8a8e..688bcdaeed53 100644
> --- a/include/uapi/linux/android/binder.h
> +++ b/include/uapi/linux/android/binder.h
> @@ -289,7 +289,7 @@ struct binder_transaction_data {
> /* General information about the transaction. */
> __u32 flags;
> __kernel_pid_t sender_pid;
> - __kernel_uid_t sender_euid;
> + __kernel_uid32_t sender_euid;
> binder_size_t data_size; /* number of bytes of data */
> binder_size_t offsets_size; /* number of bytes of offsets */
>
> --
> 2.36.1.255.ge46751e96f-goog
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] binder: fix sender_euid type in uapi header
2022-06-01 16:52 ` Masahiro Yamada
@ 2022-06-01 17:35 ` Todd Kjos
0 siblings, 0 replies; 3+ messages in thread
From: Todd Kjos @ 2022-06-01 17:35 UTC (permalink / raw)
To: Masahiro Yamada
Cc: Carlos Llamas, Arnd Bergmann, Greg Kroah-Hartman, Todd Kjos,
Cc: Android Kernel, Linux Kernel Mailing List,
Christopher Ferris
On Wed, Jun 1, 2022 at 9:53 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Wed, Jun 1, 2022 at 10:00 AM Carlos Llamas <cmllamas@google.com> wrote:
> >
> > The {pid,uid}_t fields of struct binder_transaction were recently
> > replaced to use kernel types in commit 169adc2b6b3c ("android/binder.h:
> > add linux/android/binder(fs).h to UAPI compile-test coverage").
> >
> > However, using __kernel_uid_t here breaks backwards compatibility in
> > architectures using 16-bits for this type, since glibc and some others
> > still expect a 32-bit uid_t. Instead, let's use __kernel_uid32_t which
> > avoids this compatibility problem.
> >
> > Fixes: 169adc2b6b3c ("android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage")
> > Reported-by: Christopher Ferris <cferris@google.com>
> > Signed-off-by: Carlos Llamas <cmllamas@google.com>
> > ---
>
> Ahhh, good catch.
>
> Thank you for fixing this!
>
> Reviewed-by: Masahiro Yamada <masahiroy@kernel.org>
Acked-by: Todd Kjos <tkjos@google.com>
>
>
> > include/uapi/linux/android/binder.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/include/uapi/linux/android/binder.h b/include/uapi/linux/android/binder.h
> > index 11157fae8a8e..688bcdaeed53 100644
> > --- a/include/uapi/linux/android/binder.h
> > +++ b/include/uapi/linux/android/binder.h
> > @@ -289,7 +289,7 @@ struct binder_transaction_data {
> > /* General information about the transaction. */
> > __u32 flags;
> > __kernel_pid_t sender_pid;
> > - __kernel_uid_t sender_euid;
> > + __kernel_uid32_t sender_euid;
> > binder_size_t data_size; /* number of bytes of data */
> > binder_size_t offsets_size; /* number of bytes of offsets */
> >
> > --
> > 2.36.1.255.ge46751e96f-goog
> >
>
>
> --
> Best Regards
> Masahiro Yamada
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-01 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01 1:00 [PATCH] binder: fix sender_euid type in uapi header Carlos Llamas
2022-06-01 16:52 ` Masahiro Yamada
2022-06-01 17:35 ` Todd Kjos
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).