[PATCH v2 0/3] binder: Use kmap_local_page() in binder_alloc.c

Fabio M. De Francesco posted 3 patches 4 years ago
drivers/android/binder_alloc.c | 22 +++++-----------------
1 file changed, 5 insertions(+), 17 deletions(-)
[PATCH v2 0/3] binder: Use kmap_local_page() in binder_alloc.c
Posted by Fabio M. De Francesco 4 years ago
Use kmap_local_page() in binder_alloc.c because kmap() and kmap_atomic()
are being deprecated and kmap_local_page() is preferred where it is
feasible.

With kmap_local_page(), the mapping is per thread, CPU local and not
globally visible. Furthermore, the mapping can be acquired from any
context, including interrupts.

Fabio M. De Francesco (3):
  binder: Use memset_page() in binder_alloc_clear_buf()
  binder: Use kmap_local_page() in binder_alloc_copy_user_to_buffer()
  binder: Use memcpy_{to,from}_page() in binder_alloc_do_buffer_copy()

 drivers/android/binder_alloc.c | 22 +++++-----------------
 1 file changed, 5 insertions(+), 17 deletions(-)

-- 
2.34.1
Re: [PATCH v2 0/3] binder: Use kmap_local_page() in binder_alloc.c
Posted by ira.weiny@intel.com 4 years ago
On Mon, Apr 25, 2022 at 07:57:51PM +0200, Fabio M. De Francesco wrote:
> Use kmap_local_page() in binder_alloc.c because kmap() and kmap_atomic()
> are being deprecated and kmap_local_page() is preferred where it is
> feasible.
> 
> With kmap_local_page(), the mapping is per thread, CPU local and not
> globally visible. Furthermore, the mapping can be acquired from any
> context, including interrupts.

For the series:

Reviewed-by: Ira Weiny <ira.weiny@intel.com>

> 
> Fabio M. De Francesco (3):
>   binder: Use memset_page() in binder_alloc_clear_buf()
>   binder: Use kmap_local_page() in binder_alloc_copy_user_to_buffer()
>   binder: Use memcpy_{to,from}_page() in binder_alloc_do_buffer_copy()
> 
>  drivers/android/binder_alloc.c | 22 +++++-----------------
>  1 file changed, 5 insertions(+), 17 deletions(-)
> 
> -- 
> 2.34.1
>