UPSTREAM: binder: avoid kernel vm_area for buffer fixups
authorTodd Kjos <tkjos@android.com>
Fri, 8 Feb 2019 18:35:17 +0000 (10:35 -0800)
committerTodd Kjos <tkjos@google.com>
Mon, 25 Mar 2019 22:19:45 +0000 (15:19 -0700)
commit5f46f335bd4da179c0e247a377d41ab62da769cb
treeaad1a7e480d71dfcbb9a1b7333d2a3bfa2099100
parent5088f1355ea1c497c6f2dfbf05e05595424205f5
UPSTREAM: binder: avoid kernel vm_area for buffer fixups

Refactor the functions to validate and fixup struct
binder_buffer pointer objects to avoid using vm_area
pointers. Instead copy to/from kernel space using
binder_alloc_copy_to_buffer() and
binder_alloc_copy_from_buffer(). The following
functions were refactored:

refactor binder_validate_ptr()
binder_validate_fixup()
binder_fixup_parent()

(cherry pick from commit db6b0b810bf945d1991917ffce0e93383101f2fa)
Bug: 67668716
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ic222af9b6c56bf48fd0b65debe981d19a7809e77
drivers/android/binder.c