diff options
| author | Tri Vo <trong@google.com> | 2019-09-24 13:00:43 -0700 |
|---|---|---|
| committer | Tri Vo <trong@google.com> | 2019-09-25 12:49:38 -0700 |
| commit | ff89b8d8c28ee19dd94df239018c7142394c5082 (patch) | |
| tree | 64e571d8faf1e6164fb6760256c1348df8a4dbe2 /libutils/ProcessCallStack_fuzz.cpp | |
| parent | 03642ad8b88a48fc22d714c9d0e4f2a368d356ac (diff) | |
ueventd: duplicate /dev/ashmem
We want ashmem to only be used via libcutils API, with long-term goal
being deprecation of ashmem with memfd. To do that we route libcutils to
a new source of ashmem fds. We then phase out uses of /dev/ashmem that
doesn't go through libcutils using SELinux.
In Q, we introduced ashmemd as the source of ashmem fds to libcutils.
However, having a separate process and, consequently, binder hops to
handle /dev/ashmem results in performance/memory overhead.
To address the overhead, replace ashmemd with a duplicate of
/dev/ashmem. Name it /dev/ashmem<boot_id>, where boot_id is a random
number generated on each boot. This way we make sure that developers
don't accidentally depend on /dev/ashmem<boot_id>, as that name can't be
hardcoded.
Bug: 139855428
Test: writing "add"/"remove" to /sys/class/misc/ashmem/uevent correctly
adds/removes /dev/ashmem and /dev/ashmem/boot_id
Change-Id: I36d23116048bfcd99903ba46cc133161835a2cfa
Diffstat (limited to 'libutils/ProcessCallStack_fuzz.cpp')
0 files changed, 0 insertions, 0 deletions
