diff options
author | Serban Constantinescu <serban.constantinescu@arm.com> | 2014-01-15 11:28:36 +0000 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-03-19 13:10:58 -0700 |
commit | 34d977e7af9bb097530aa71204d591485f7dddc7 (patch) | |
tree | 116aecb1ffad3421a3d80e8846a62aa9de0a1558 | |
parent | f772c52eb8a1e800e83945e44d1e5d8c959db000 (diff) |
staging: android: binder: fix ABI for 64bit Android
This patch fixes the ABI for 64bit Android userspace.
BC_REQUEST_DEATH_NOTIFICATION and BC_CLEAR_DEATH_NOTIFICATION claim
to be using struct binder_ptr_cookie, but they are using a 32bit handle
and a pointer.
On 32bit systems the payload size is the same as the size of struct
binder_ptr_cookie, however for 64bit systems this will differ. This
patch adds struct binder_handle_cookie that fixes this issue for 64bit
Android.
Since there are no 64bit users of this interface that we know of this
change should not affect any existing systems.
Change-Id: I8909cbc50aad48ccf371270bad6f69ff242a8c22
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
-rw-r--r-- | drivers/staging/android/uapi/binder.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/staging/android/uapi/binder.h b/drivers/staging/android/uapi/binder.h index 93edeb84101d..b89a7e95892b 100644 --- a/drivers/staging/android/uapi/binder.h +++ b/drivers/staging/android/uapi/binder.h @@ -152,6 +152,11 @@ struct binder_ptr_cookie { void *cookie; }; +struct binder_handle_cookie { + __u32 handle; + void *cookie; +} __attribute__((packed)); + struct binder_pri_desc { __s32 priority; __u32 desc; @@ -308,15 +313,15 @@ enum binder_driver_command_protocol { * of looping threads it has available. */ - BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_ptr_cookie), + BC_REQUEST_DEATH_NOTIFICATION = _IOW('c', 14, struct binder_handle_cookie), /* - * void *: ptr to binder + * int: handle * void *: cookie */ - BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_ptr_cookie), + BC_CLEAR_DEATH_NOTIFICATION = _IOW('c', 15, struct binder_handle_cookie), /* - * void *: ptr to binder + * int: handle * void *: cookie */ |