From c0bb441b15e70b26aa849c719a62ab4567e8f100 Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Fri, 28 Dec 2018 15:12:56 +0800 Subject: [PATCH] Fix runtime namespace links for vendor processes This commit removes the soname filter from the namespace fallback link from `runtime` to `system` in the vendor process. This fixes the problem that vendor process might fail to load `libnetd_client.so`, `libc_malloc_debug.so`, `libc_malloc_debug_leak.so`, and other libc dependencies. This commit also removes the namespace fallback link from `runtime` to `default` in the vendor process. According to the comments in [1], the original intention was to allow the access to `/system/${LIB}` not `/vendor/${LIB}`. Furthermore, `com.android.runtime` suppose to work without libraries from `/vendor/${LIB}`. [1] https://android-review.googlesource.com/c/858456 Bug: 119867084 Bug: 122025516 # Motivation of this commit Test: Executables under vendor partition are not blocked by `libnetd_client.so` not found error. Change-Id: I682baada9d755910832474bb3d8307cd49c21ece --- rootdir/etc/ld.config.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/rootdir/etc/ld.config.txt b/rootdir/etc/ld.config.txt index 8f7ceba8a..b0ba939fb 100644 --- a/rootdir/etc/ld.config.txt +++ b/rootdir/etc/ld.config.txt @@ -333,11 +333,9 @@ namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES% ############################################################################### namespace.runtime.isolated = true namespace.runtime.search.paths = /apex/com.android.runtime/${LIB} -namespace.runtime.links = system,default -namespace.runtime.link.system.shared_libs = %LLNDK_LIBRARIES% -namespace.runtime.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% +namespace.runtime.links = system # TODO(b/119867084): Restrict to Bionic dlopen dependencies. -namespace.runtime.link.default.allow_all_shared_libs = true +namespace.runtime.link.system.allow_all_shared_libs = true ############################################################################### # "vndk" namespace