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:
Isaac J. Manjarres <isaacmanjarres@google.com>
Loading
Please register or sign in to comment