]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - drivers/android/binder.c
binder: create userspace-to-binder-buffer copy function
authorTodd Kjos <tkjos@android.com>
Fri, 8 Feb 2019 18:35:14 +0000 (10:35 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 09:43:57 +0000 (10:43 +0100)
commit1a7c3d9bb7a926e88d5f57643e75ad1abfc55013
treea64c869735ee00eded6f495cb250afefd96e1bba
parent6cffd79504ce040f460831030d3069fa1c99bb71
binder: create userspace-to-binder-buffer copy function

The binder driver uses a vm_area to map the per-process
binder buffer space. For 32-bit android devices, this is
now taking too much vmalloc space. This patch removes
the use of vm_area when copying the transaction data
from the sender to the buffer space. Instead of using
copy_from_user() for multi-page copies, it now uses
binder_alloc_copy_user_to_buffer() which uses kmap()
and kunmap() to map each page, and uses copy_from_user()
for copying to that page.

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