From: Greg KH <gregkh@linuxfoundation.org>
To: John Stultz <john.stultz@linaro.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
"Serban Constantinescu" <serban.constantinescu@arm.com>,
"Colin Cross" <ccross@android.com>,
"Arve Hjønnevåg" <arve@android.com>,
"Android Kernel Team" <kernel-team@android.com>
Subject: Re: [PATCH 12/14] staging: binder: Fix ABI for 64bit Android
Date: Tue, 18 Feb 2014 11:08:28 -0800 [thread overview]
Message-ID: <20140218190828.GA10376@kroah.com> (raw)
In-Reply-To: <1392674322-9036-13-git-send-email-john.stultz@linaro.org>
On Mon, Feb 17, 2014 at 01:58:40PM -0800, John Stultz wrote:
> From: Serban Constantinescu <serban.constantinescu@arm.com>
>
> 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.
But you are changing the ioctl structures here, what is that going to
cause with old programs?
>
> Cc: Colin Cross <ccross@android.com>
> Cc: Arve Hjønnevåg <arve@android.com>
> Cc: Serban Constantinescu <serban.constantinescu@arm.com>
> Cc: Android Kernel Team <kernel-team@android.com>
I am going to require Acks from someone on the Android team to accept
this, or any other 64bit binder patch, given all the back-and-forth that
has happened with the different patch sets here over the past year or
so.
Until then, I can't take this (and I think this patch is still
broken...)
> Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
> [jstultz: Minor commit tweaks, few 80+ col fixes for checkpatch]
> Signed-off-by: John Stultz <john.stultz@linaro.org>
> ---
> drivers/staging/android/uapi/binder.h | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/staging/android/uapi/binder.h b/drivers/staging/android/uapi/binder.h
> index 2b1eb81..4071fcf 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));
Are you sure this isn't supposed to be a union?
> +
> struct binder_pri_desc {
> __s32 priority;
> __u32 desc;
> @@ -308,15 +313,17 @@ 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
How does this not break existing user/kernel code if only one of them
gets rebuilt with this new header file? You just changed the ABI here,
not nice...
greg k-h
next prev parent reply other threads:[~2014-02-18 19:07 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-17 21:58 [PATCH 00/14][RFC] Android updates for staging-next John Stultz
2014-02-17 21:58 ` [PATCH 01/14] staging: binder: Fix death notifications John Stultz
2014-02-18 19:02 ` Greg KH
2014-02-18 19:21 ` John Stultz
2014-02-18 19:33 ` Greg KH
2014-02-17 21:58 ` [PATCH 02/14] staging: android: Split uapi out of android_alarm.h John Stultz
2014-02-17 21:58 ` [PATCH 03/14] staging: android: Split uapi out of ashmem.h John Stultz
2014-02-17 21:58 ` [PATCH 04/14] staging: android: split uapi out of sync.h and sw_sync.h John Stultz
2014-02-17 21:58 ` [PATCH 05/14] staging: android: Split uapi out of binder.h John Stultz
2014-02-17 21:58 ` [PATCH 06/14] staging: ion: Create separate heap and client debugfs directories John Stultz
2014-02-17 21:58 ` [PATCH 07/14] staging: ion: Fix debugfs handling of multiple kernel clients John Stultz
2014-02-17 21:58 ` [PATCH 08/14] staging: ion: Store a copy of the client name on client creation John Stultz
2014-02-17 21:58 ` [PATCH 09/14] staging: ion: Make sure all clients are exposed in debugfs John Stultz
2014-02-17 21:58 ` [PATCH 10/14] staging: ion: Move shrinker out of heaps John Stultz
2014-02-17 21:58 ` [PATCH 11/14] staging: ion: Add private buffer flag to skip page pooling on free John Stultz
2014-02-17 21:58 ` [PATCH 12/14] staging: binder: Fix ABI for 64bit Android John Stultz
2014-02-18 19:08 ` Greg KH [this message]
2014-02-18 19:30 ` John Stultz
2014-02-18 19:49 ` Greg KH
2014-02-18 20:02 ` John Stultz
2014-02-18 20:32 ` Greg KH
2014-02-19 0:08 ` Arve Hjønnevåg
2014-02-19 2:13 ` Greg KH
2014-02-17 21:58 ` [PATCH 13/14] staging: binder: Support concurrent 32 bit and 64 bit processes John Stultz
2014-02-18 19:09 ` Greg KH
2014-02-18 19:10 ` Greg KH
2014-02-18 19:43 ` John Stultz
2014-02-17 21:58 ` [PATCH 14/14] staging: binder: Improve Kconfig entry for ANDROID_BINDER_IPC_32BIT John Stultz
2014-02-19 0:18 ` Arve Hjønnevåg
2014-02-19 0:30 ` John Stultz
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=20140218190828.GA10376@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arve@android.com \
--cc=ccross@android.com \
--cc=john.stultz@linaro.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serban.constantinescu@arm.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 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.