ashmemd: daemon that provides /dev/ashmem fds

Motivation: we want to replace /dev/ashmem with memfd. To do so we need
all usage of /dev/ashmem to go through libcutils. Once that happens, we
migrate libcutils to use memfd.

ashmemd is our way to enforce that apps are using the existing
ASharedMemory_create API and not bypassing it to go directly to

ashmemd serves opened file descriptors. The following way should be the
only way for apps to open an fd to /dev/ashmem:
app -> ASharedMemory_create -> libcutils -> ashmemd -> /dev/ashmem

Bug: 113362644
Test: ashmemd_test
Change-Id: I9068cefa950f91dba0f1b75daca23f02d933b1c8
7 files changed
tree: 2c4e7b3f0657b43e1b61c9b3e3569f405e4a101a
  1. Android.bp
  3. aidl/
  4. ashmemd.cpp
  5. ashmemd.rc
  6. ashmemd_client.cpp
  7. tests/