Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f22d69f8 authored by Serban Constantinescu's avatar Serban Constantinescu Committed by David Ng
Browse files

staging: android: binder: fix alignment issues



The Android userspace aligns the data written to the binder buffers to
4bytes. Thus for 32bit platforms or 64bit platforms running an 32bit
Android userspace we can have a buffer looking like this:

platform    buffer(binder_cmd   pointer)      size
32/32                 32b         32b          8B
64/32                 32b         64b          12B
64/64                 32b         64b          12B

Thus the kernel needs to check that the buffer size is aligned to 4bytes
not to (void *) that will be 8bytes on 64bit machines.

The change does not affect existing 32bit ABI.

Change-Id: Idcad35da1c1567ee0676d60d03afd07b219c59ea
Signed-off-by: default avatarSerban Constantinescu <serban.constantinescu@arm.com>
Acked-by: default avatarArve Hjønnevåg <arve@android.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: ec35e852dc9de9809f88ff397d7a611208880f9f
Git-repo: https://android.googlesource.com/kernel/common/


Signed-off-by: default avatarNeeti Desai <neetid@codeaurora.org>
Signed-off-by: default avatarAjay Dudani <adudani@codeaurora.org>
parent 0a6d1410
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment