binder: use userspace pointer as base of buffer space
authorTodd Kjos <tkjos@android.com>
Fri, 8 Feb 2019 18:35:20 +0000 (10:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 09:43:57 +0000 (10:43 +0100)
commitbde4a19fc04f5f46298c86b1acb7a4af1d5f138d
tree1062d8eaaf1dbfc760c295387390de1f4022e64c
parentc41358a5f5217abd7c051e8d42397e5b80f3b3ed
binder: use userspace pointer as base of buffer space

Now that alloc->buffer points to the userspace vm_area
rename buffer->data to buffer->user_data and rename
local pointers that hold user addresses. Also use the
"__user" tag to annotate all user pointers so sparse
can flag cases where user pointer vaues  are copied to
kernel pointers. Refactor code to use offsets instead
of user pointers.

Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/android/binder.c
drivers/android/binder_alloc.c
drivers/android/binder_alloc.h
drivers/android/binder_alloc_selftest.c
drivers/android/binder_trace.h