Android: Add support for 32-bit Binder calls in a 64-bit kernel
authorBintian Wang <bintian.wang@linaro.org>
Wed, 9 Oct 2013 10:52:57 +0000 (18:52 +0800)
committerMark Brown <broonie@linaro.org>
Wed, 22 Jan 2014 15:36:17 +0000 (15:36 +0000)
commit56373a4736117e97330ebd049e235f9baca381c8
tree9e46acb2144d720142ecfee2213c6206298caa86
parente986cff7970bb3de117c92db44cf3618848ddb25
Android: Add support for 32-bit Binder calls in a 64-bit kernel

Android's IPC, Binder, does not support calls from a 32-bit userspace
in a 64 bit kernel. This patch adds support for syscalls coming from a
32-bit userspace in a 64-bit kernel.

Most of the changes were applied to types that change sizes between
32 and 64 bit world. This will also fix some of the issues around
checking the size of an incoming transaction package in the ioctl
switch. Since  the transaction's ioctl number are generated using
_IOC(dir,type,nr,size), a different userspace size will generate
a different ioctl number, thus switching by _IOC_NR is a better
solution.

The patch has been successfully tested on ARMv8 AEM and Versatile
Express V2P-CA9.

[Fixed up several conflicts with upstream -- broonie]

Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/staging/android/binder.c
drivers/staging/android/binder.h