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

Commit b20cf5e3 authored by Isaac J. Manjarres's avatar Isaac J. Manjarres Committed by Isaac Manjarres
Browse files

ashmem: Make is_memfd_fd() more rigorous



is_memfd_fd() assumes that memfd usage for libcutils is a system-wide
policy. A future patch will make it so that memfd usage depends on the
device's vendor API level, as well as the target API level of the
caller of ashmem_create_region(). Therefore, make is_memfd_fd() capable
of detecting that a given fd is actually a memfd by checking if the
filename starts with "/memfd:".

Bug: 111903542
Change-Id: Ic993b12e55fc162e5bbf656d9d495bc91abd5d5c
Signed-off-by: default avatarIsaac J. Manjarres <isaacmanjarres@google.com>
parent bbb03df5
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