From: Greg KH <gregkh@linuxfoundation.org>
To: Serban Constantinescu <Serban.Constantinescu@arm.com>
Cc: "arve@android.com" <arve@android.com>,
"devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"john.stultz@linaro.org" <john.stultz@linaro.org>,
"ccross@android.com" <ccross@android.com>,
"zach.pfeffer@linaro.org" <zach.pfeffer@linaro.org>,
Dave Butcher <Dave.Butcher@arm.com>,
Catalin Marinas <catalin.marinas@arm.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: Fwd: Re: [PATCH 1/2] Staging: android: binder: Add support for 32bit binder calls in a 64bit kernel
Date: Wed, 5 Dec 2012 08:56:45 -0800 [thread overview]
Message-ID: <20121205165645.GA28014@kroah.com> (raw)
In-Reply-To: <50BF78D5.4060003@arm.com>
On Wed, Dec 05, 2012 at 04:39:49PM +0000, Serban Constantinescu wrote:
> >I was wondering when someone would notice that this code was not going
> >to work for this type of system, nice to see that you are working to fix
> >it up. But, I'll reask Dan's question here, why not use the compat32
> >ioctl interface instead? Shouldn't that be the easier way to do this?
>
> Binder uses a 2 layer ioctl structure i.e. you can't know from the top
> of the ioctl handler the size of the incoming package.
How is this different from all other ioctl handlers in drivers?
> Therefore adding a wrapper for a 64bit kernel is not an option.
Really? Have you tried? And the wrapper isn't for the 64bit kernel,
it's the other way around, see the compat32 ioctl code for details.
> Should a 64bit Android ever appear we would probably want to support
> 32bit legacy applications.
I agree, this should be fixed, but please do so in the way that we fixed
the rest of the kernel for this problem, don't do it in a custom way
please.
> For this we will need the same binder/ashmem driver to service both a
> 32bit application as well as a 64bit application in a 64bit kernel.
> Therefore I guess the way forward will be to support 32bit file systems
> in a 64bit kernel without any change to the existing user space
> (implemented in this patch) and at some point extend the ioctl range
> with the needed functionality for 64bit user space.
Filesystems shouldn't have anything to do with the problems, it's the
mode that the kernel is running in here, right?
> >Also, one meta comment, never use the uint32_t types, use the native
> >kernel types (u32 and the like.) If you are crossing the user/kernel
> >boundry, use the other correct types for those data structures (__u32
> >and the like). What you did here is mix and match things so much that I
> >really can't verify that it is all correct.
>
> I have tried to in-line my changes with the types already used in the
> driver but I will update to using the suggested types.
Feel free to send a patch first, to fix up the types in the drivers, and
then build on it, if you wish to make it easier for you. I imagine this
will be a patch series anyway, if you wish to make it easy for us to
review (hint, you do...)
thanks,
greg k-h
next prev parent reply other threads:[~2012-12-05 16:56 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-04 10:44 [PATCH 0/2] Android: Add support for a 32bit Android file system in a 64bit kernel Serban Constantinescu
2012-12-04 10:44 ` [PATCH 1/2] Staging: android: binder: Add support for 32bit binder calls " Serban Constantinescu
2012-12-04 16:17 ` Greg KH
2012-12-05 14:31 ` Serban Constantinescu
2012-12-05 15:11 ` Greg KH
2012-12-05 16:39 ` Fwd: " Serban Constantinescu
2012-12-05 16:56 ` Greg KH [this message]
2012-12-05 0:26 ` Arve Hjønnevåg
2012-12-05 14:54 ` Serban Constantinescu
2012-12-05 23:44 ` Arve Hjønnevåg
2012-12-04 10:44 ` [PATCH 2/2] Staging: android: ashmem: Add support for 32bit ashmem " Serban Constantinescu
2012-12-04 11:45 ` Dan Carpenter
2012-12-05 14:25 ` Serban Constantinescu
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=20121205165645.GA28014@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Dave.Butcher@arm.com \
--cc=Serban.Constantinescu@arm.com \
--cc=arve@android.com \
--cc=catalin.marinas@arm.com \
--cc=ccross@android.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=zach.pfeffer@linaro.org \
/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 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).