BACKPORT: binder: add function to copy binder object from buffer
authorTodd Kjos <tkjos@android.com>
Fri, 8 Feb 2019 18:35:16 +0000 (10:35 -0800)
committerTodd Kjos <tkjos@google.com>
Mon, 25 Mar 2019 22:19:45 +0000 (15:19 -0700)
commit5088f1355ea1c497c6f2dfbf05e05595424205f5
treecdcf120d4cb0c434aea4aa9c0db8a0941ff0dfb1
parent4d01f6b116f24693b09172878a8b03adb65a54cc
BACKPORT: binder: add function to copy binder object from buffer

When creating or tearing down a transaction, the binder driver
examines objects in the buffer and takes appropriate action.
To do this without needing to dereference pointers into the
buffer, the local copies of the objects are needed. This patch
introduces a function to validate and copy binder objects
from the buffer to a local structure.

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