]> git.baikalelectronics.ru Git - kernel.git/commit
binder: add functions to copy to/from binder buffers
authorTodd Kjos <tkjos@android.com>
Fri, 8 Feb 2019 18:35:15 +0000 (10:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 09:43:57 +0000 (10:43 +0100)
commita7a6663427b4940e82e5e5af6dcb4e16394bb734
tree367bf43c0df5e7bee2ca62a7939062d581f465ff
parentdc997519d27bbc89f958b34733371d367afbc4e0
binder: add functions to copy to/from binder buffers

Avoid vm_area when copying to or from binder buffers.
Instead, new copy functions are added that copy from
kernel space to binder buffer space. These use
kmap_atomic() and kunmap_atomic() to create temporary
mappings and then memcpy() is used to copy within
that page.

Also, kmap_atomic() / kunmap_atomic() use the appropriate
cache flushing to support VIVT cache architectures.
Allow binder to build if CPU_CACHE_VIVT is defined.

Several uses of the new functions are added here. More
to follow in subsequent patches.

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