Speaker
Description
Android relies on the anonymous shared memory–ashmem–allocator to allocate anonymous (i.e. not file-backed) buffers that can easily and quickly be shared between processes via file descriptors.
Ashmem is an Android specific memory allocator that is implemented on top of the Linux kernel’s shmem subsystem, which allows for fast memory sharing, as all processes that refer to a shmem buffer are able to map and access the same regions of memory.
However, there are several drawbacks to using the ashmem memory allocator:
The ashmem kernel driver is not part of the upstream Linux kernel and therefore does not benefit from any upstream usage/test coverage and is considered technical debt.
The upstream Linux kernel already exposes a similar facility that allows anonymous memory buffers to be shared via file descriptors known as memfd.
Given that, Android has been making an effort to migrate all existing ashmem usage to switch to memfd.
This talk is centered around the approach that Android is taking to seamlessly move away from ashmem to memfd, as well as challenges, solutions, and forward facing work, such as:
Maintaining compatibility with older applications and devices.
SELinux support to eventually allow fine-grained access control for memfds.