android: Enable building ashmem and binder as modules
authorBen Hutchings <ben@decadent.org.uk>
Fri, 22 Jun 2018 16:27:00 +0000 (17:27 +0100)
committerSalvatore Bonaccorso <carnil@debian.org>
Fri, 25 Apr 2025 19:51:43 +0000 (21:51 +0200)
commiteae64c9d8643d534d491b004f646c961c1ef2b8a
tree3e5e0d1cd62b894a82c1182e750cceb2131107be
parent7f3467a06e8aafcbed3382b5e90f6b67227d45c9
android: Enable building ashmem and binder as modules

Bug-Debian: https://bugs.debian.org/901492

We want to enable use of the Android ashmem and binder drivers to
support Anbox, but they should not be built-in as that would waste
resources and increase security attack surface on systems that don't
need them.

- Add a MODULE_LICENSE declaration to ashmem
- Change the Makefiles to build each driver as an object with the
  "_linux" suffix (which is what Anbox expects)
- Change config symbol types to tristate

Update:
In upstream commit 721412ed3d titled "staging: remove ashmem" the ashmem
driver was removed entirely. Secondary commit message:
"The mainline replacement for ashmem is memfd, so remove the legacy
code from drivers/staging/"
Consequently, the ashmem part of this patch has been removed.

Gbp-Pq: Topic debian
Gbp-Pq: Name android-enable-building-ashmem-and-binder-as-modules.patch
drivers/android/Kconfig
drivers/android/Makefile
drivers/android/binder_alloc.c