ANDROID: mm/memfd-ashmem-shim: Introduce shim layer
Certain applications treat any shared memory buffer that they obtain
as an ashmem buffer, meaning that they will attempt to invoke ashmem
ioctl commands on that buffer.
Android is transitioning to replacing ashmem with memfd, and memfd
currently does not support ashmem ioctl commands. So, when an
application attempts to invoke an ashmem ioctl command on a memfd,
the invocation will fail and report an error back to the app.
In order to preserve compatibility between these apps and memfds,
add a shim layer which will handle ashmem ioctl commands for memfds.
Bug: 111903542
Change-Id: I268a29ee2805739550d79fd2c21d3cfb5a852642
Signed-off-by:
Isaac J. Manjarres <isaacmanjarres@google.com>
Showing
- mm/Kconfig 11 additions, 0 deletionsmm/Kconfig
- mm/Makefile 1 addition, 0 deletionsmm/Makefile
- mm/memfd-ashmem-shim-internal.h 52 additions, 0 deletionsmm/memfd-ashmem-shim-internal.h
- mm/memfd-ashmem-shim.c 238 additions, 0 deletionsmm/memfd-ashmem-shim.c
- mm/memfd-ashmem-shim.h 21 additions, 0 deletionsmm/memfd-ashmem-shim.h
Loading
Please register or sign in to comment