binder: fix sender_euid type in uapi header
PATCH 1/1 binder: fix sender_euid type in uapi header
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.
--- include/uapi/linux/android/binder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
include/uapi/linux/android/binder.h +1 -1
@@ -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 */
Signature · 1 line
2.36.1.255.ge46751e96f-goog
Quoted 10 lines · Carlos Llamas
The {pid,uid}_t fields of struct
binder_transactionwere recently replaced to use kernel types in commit169adc2b6b3c("android/binder.h:
add linux/android/binder(fs).h to UAPI compile-test coverage").However, using
__kernel_uid_there breaks backwards compatibility in architectures using 16-bits for this type, since glibc and some others still expect a 32-bituid_t. Instead, let's use__kernel_uid32_twhich avoids this compatibility problem.
Quoted 4 lines
Fixes 169adc2b6b3c ("android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage")Reported-by Christopher Ferris <[email protected]>Signed-off-by Carlos Llamas <[email protected]>---
Ahhh, good catch.
Thank you for fixing this!
Quoted 19 lines
include/uapi/linux/android/binder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/android/binder.h +1
-2@@ -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
Signature · 2 lines
Best Regards Masahiro Yamada
Todd Kjos
Acked-byQuoted 17 lines · Masahiro Yamada
Quoted 10 lines · Carlos Llamas
The {pid,uid}_t fields of struct
binder_transactionwere recently replaced to use kernel types in commit169adc2b6b3c("android/binder.h:
add linux/android/binder(fs).h to UAPI compile-test coverage").However, using
__kernel_uid_there breaks backwards compatibility in architectures using 16-bits for this type, since glibc and some others still expect a 32-bituid_t. Instead, let's use__kernel_uid32_twhich avoids this compatibility problem.Quoted 4 lines
Fixes 169adc2b6b3c ("android/binder.h: add linux/android/binder(fs).h to UAPI compile-test coverage")Reported-by Christopher Ferris <[email protected]>Signed-off-by Carlos Llamas <[email protected]>---
Quoted 5 lines
Ahhh, good catch.
Thank you for fixing this!
Reviewed-by Masahiro Yamada <[email protected]>
Quoted 26 lines
Quoted 19 lines
include/uapi/linux/android/binder.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)include/uapi/linux/android/binder.h +1
-2@@ -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 */ --Quoted 2 lines
2.36.1.255.ge46751e96f-goog
--
Best Regards
Masahiro Yamada