Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72967f87 authored by Todd Kjos's avatar Todd Kjos Committed by LuK1337
Browse files

UPSTREAM: binder: read pre-translated fds from sender buffer



This patch is to prepare for an up coming patch where we read
pre-translated fds from the sender buffer and translate them before
copying them to the target.  It does not change run time.

The patch adds two new parameters to binder_translate_fd_array() to
hold the sender buffer and sender buffer parent.  These parameters let
us call copy_from_user() directly from the sender instead of using
binder_alloc_copy_from_buffer() to copy from the target.  Also the patch
adds some new alignment checks.  Previously the alignment checks would
have been done in a different place, but this lets us print more
useful error messages.

Reviewed-by: default avatarMartijn Coenen <maco@android.com>
Acked-by: default avatarChristian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: default avatarTodd Kjos <tkjos@google.com>
Link: https://lore.kernel.org/r/20211130185152.437403-4-tkjos@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 137131904
Bug: 257685302
(cherry picked from commit 656e01f3ab54afe71bed066996fc2640881e1220)
Change-Id: Ib786020e49bd33e35aec88d43965f9d98021fa53
Signed-off-by: default avatarCarlos Llamas <cmllamas@google.com>
parent b007cade
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment