android: binder: Move buffer out of area shared with user space

Binder driver allocates buffer meta data in a region that is mapped
in user space. These meta data contain pointers in the kernel.

This patch allocates buffer meta data on the kernel heap that is
not mapped in user space, and uses a pointer to refer to the data mapped.

Signed-off-by: Sherry Yang <sherryy@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Sherry Yang
2017-08-23 08:46:41 -07:00
committed by Greg Kroah-Hartman
parent 4175e2b46f
commit 74310e06be
3 changed files with 90 additions and 67 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ struct binder_buffer {
size_t data_size;
size_t offsets_size;
size_t extra_buffers_size;
uint8_t data[0];
void *data;
};
/**