diff options
author | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2019-03-06 01:35:17 -0500 |
---|---|---|
committer | Joonas Kylmälä <joonas.kylmala@iki.fi> | 2019-06-08 16:38:39 -0400 |
commit | e6a056d93fcaf5d1f2e711b10b4b6532035456a3 (patch) | |
tree | 571888fd8b5648c2813e403d2656d12dc5869d96 | |
parent | 100cf4a9f5f62b2844ae262e679e78b5acb51332 (diff) | |
download | core-e6a056d93fcaf5d1f2e711b10b4b6532035456a3.tar.gz core-e6a056d93fcaf5d1f2e711b10b4b6532035456a3.tar.bz2 core-e6a056d93fcaf5d1f2e711b10b4b6532035456a3.zip |
Use more relaxed VNDK configreplicant-9
This allows graphics libraries to communicate with each other.
Change-Id: I4c66e86b6353a174584ff77b38989713f2f77a9e
Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
-rw-r--r-- | rootdir/etc/ld.config.vndk_lite.txt | 226 |
1 files changed, 10 insertions, 216 deletions
diff --git a/rootdir/etc/ld.config.vndk_lite.txt b/rootdir/etc/ld.config.vndk_lite.txt index db65c14fc..ca6aafe41 100644 --- a/rootdir/etc/ld.config.vndk_lite.txt +++ b/rootdir/etc/ld.config.vndk_lite.txt @@ -1,47 +1,24 @@ # Copyright (C) 2017 The Android Open Source Project # # Bionic loader config file. +# This gives the exactly the same namespace setup in pre-O. # -# Don't change the order here. The first pattern that matches with the -# absolute path of an executable is selected. -dir.system = /system/bin/ -dir.system = /system/xbin/ -dir.system = /product/bin/ - -dir.vendor = /odm/bin/ -dir.vendor = /vendor/bin/ -dir.vendor = /data/nativetest/odm -dir.vendor = /data/nativetest64/odm -dir.vendor = /data/benchmarktest/odm -dir.vendor = /data/benchmarktest64/odm -dir.vendor = /data/nativetest/vendor -dir.vendor = /data/nativetest64/vendor -dir.vendor = /data/benchmarktest/vendor -dir.vendor = /data/benchmarktest64/vendor - -dir.system = /data/nativetest -dir.system = /data/nativetest64 -dir.system = /data/benchmarktest -dir.system = /data/benchmarktest64 +# All binaries gets the same configuration 'legacy' +dir.legacy = /system +dir.legacy = /vendor +dir.legacy = /odm +dir.legacy = /sbin +# Except for /postinstall, where only /system is searched dir.postinstall = /postinstall -[system] -additional.namespaces = sphal,vndk,rs - -############################################################################### -# "default" namespace -# -# Framework-side code runs in this namespace. However, libs from other -# partitions are also allowed temporarily. -############################################################################### +[legacy] namespace.default.isolated = false namespace.default.search.paths = /system/${LIB} -namespace.default.search.paths += /odm/${LIB} namespace.default.search.paths += /vendor/${LIB} -namespace.default.search.paths += /product/${LIB} +namespace.default.search.paths += /odm/${LIB} namespace.default.asan.search.paths = /data/asan/system/${LIB} namespace.default.asan.search.paths += /system/${LIB} @@ -49,188 +26,6 @@ namespace.default.asan.search.paths += /data/asan/odm/${LIB} namespace.default.asan.search.paths += /odm/${LIB} namespace.default.asan.search.paths += /data/asan/vendor/${LIB} namespace.default.asan.search.paths += /vendor/${LIB} -namespace.default.asan.search.paths += /data/asan/product/${LIB} -namespace.default.asan.search.paths += /product/${LIB} - -############################################################################### -# "sphal" namespace -# -# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be -# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, -# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. -# -# This namespace is exclusivly for SP-HALs. When the framework tries to dynami- -# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying -# that they should be searched and loaded from this namespace. -# -# Note that there is no link from the default namespace to this namespace. -############################################################################### -namespace.sphal.isolated = true -namespace.sphal.visible = true - -namespace.sphal.search.paths = /odm/${LIB} -namespace.sphal.search.paths += /vendor/${LIB} - -namespace.sphal.permitted.paths = /odm/${LIB} -namespace.sphal.permitted.paths += /vendor/${LIB} - -namespace.sphal.asan.search.paths = /data/asan/odm/${LIB} -namespace.sphal.asan.search.paths += /odm/${LIB} -namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB} -namespace.sphal.asan.search.paths += /vendor/${LIB} - -namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB} -namespace.sphal.asan.permitted.paths += /odm/${LIB} -namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB} -namespace.sphal.asan.permitted.paths += /vendor/${LIB} - -# Once in this namespace, access to libraries in /system/lib is restricted. Only -# libs listed here can be used. -namespace.sphal.links = default,vndk,rs - -namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES% -namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% - -namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% - -# Renderscript gets separate namespace -namespace.sphal.link.rs.shared_libs = libRS_internal.so - -############################################################################### -# "rs" namespace -# -# This namespace is exclusively for Renderscript internal libraries. -# This namespace has slightly looser restriction than the vndk namespace because -# of the genuine characteristics of Renderscript; /data is in the permitted path -# to load the compiled *.so file and libmediandk.so can be used here. -############################################################################### -namespace.rs.isolated = true -namespace.rs.visible = true - -namespace.rs.search.paths = /odm/${LIB}/vndk-sp -namespace.rs.search.paths += /vendor/${LIB}/vndk-sp -namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% -namespace.rs.search.paths += /odm/${LIB} -namespace.rs.search.paths += /vendor/${LIB} - -namespace.rs.permitted.paths = /odm/${LIB} -namespace.rs.permitted.paths += /vendor/${LIB} -namespace.rs.permitted.paths += /data - -namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp -namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp -namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp -namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp -namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% -namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% -namespace.rs.asan.search.paths += /data/asan/odm/${LIB} -namespace.rs.asan.search.paths += /odm/${LIB} -namespace.rs.asan.search.paths += /data/asan/vendor/${LIB} -namespace.rs.asan.search.paths += /vendor/${LIB} - -namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB} -namespace.rs.asan.permitted.paths += /odm/${LIB} -namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB} -namespace.rs.asan.permitted.paths += /vendor/${LIB} -namespace.rs.asan.permitted.paths += /data - -namespace.rs.links = default,vndk - -namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES% -namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% -# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this -# namespace because RS framework libs are using them. -namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES% - -namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% - -############################################################################### -# "vndk" namespace -# -# This namespace is exclusively for vndk-sp libs. -############################################################################### -namespace.vndk.isolated = true -namespace.vndk.visible = true - -namespace.vndk.search.paths = /odm/${LIB}/vndk-sp -namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp -namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% - -namespace.vndk.permitted.paths = /odm/${LIB}/hw -namespace.vndk.permitted.paths += /odm/${LIB}/egl -namespace.vndk.permitted.paths += /vendor/${LIB}/hw -namespace.vndk.permitted.paths += /vendor/${LIB}/egl -# This is exceptionally required since android.hidl.memory@1.0-impl.so is here -namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw - -namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp -namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp -namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp -namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp -namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% -namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% - -namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw -namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw -namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl -namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl -namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw -namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw -namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl -namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl - -namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw -namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw - -# When these NDK libs are required inside this namespace, then it is redirected -# to the default namespace. This is possible since their ABI is stable across -# Android releases. -namespace.vndk.links = default -namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES% -namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES% - -############################################################################### -# Namespace config for vendor processes. In O, no restriction is enforced for -# them. However, in O-MR1, access to /system/${LIB} will not be allowed to -# the default namespace. 'system' namespace will be added to give limited -# (LL-NDK only) access. -############################################################################### -[vendor] -namespace.default.isolated = false - -namespace.default.search.paths = /odm/${LIB} -namespace.default.search.paths += /odm/${LIB}/vndk -namespace.default.search.paths += /odm/${LIB}/vndk-sp -namespace.default.search.paths += /vendor/${LIB} -namespace.default.search.paths += /vendor/${LIB}/vndk -namespace.default.search.paths += /vendor/${LIB}/vndk-sp - -# Access to system libraries are allowed -namespace.default.search.paths += /system/${LIB}/vndk%VNDK_VER% -namespace.default.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% -namespace.default.search.paths += /system/${LIB} -namespace.default.search.paths += /product/${LIB} - -namespace.default.asan.search.paths = /data/asan/odm/${LIB} -namespace.default.asan.search.paths += /odm/${LIB} -namespace.default.asan.search.paths += /data/asan/odm/${LIB}/vndk -namespace.default.asan.search.paths += /odm/${LIB}/vndk -namespace.default.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp -namespace.default.asan.search.paths += /odm/${LIB}/vndk-sp -namespace.default.asan.search.paths += /data/asan/vendor/${LIB} -namespace.default.asan.search.paths += /vendor/${LIB} -namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/vndk -namespace.default.asan.search.paths += /vendor/${LIB}/vndk -namespace.default.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp -namespace.default.asan.search.paths += /vendor/${LIB}/vndk-sp -namespace.default.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER% -namespace.default.asan.search.paths += /system/${LIB}/vndk%VNDK_VER% -namespace.default.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER% -namespace.default.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER% -namespace.default.asan.search.paths += /data/asan/system/${LIB} -namespace.default.asan.search.paths += /system/${LIB} -namespace.default.asan.search.paths += /data/asan/product/${LIB} -namespace.default.asan.search.paths += /product/${LIB} ############################################################################### # Namespace config for binaries under /postinstall. @@ -242,5 +37,4 @@ namespace.default.asan.search.paths += /product/${LIB} ############################################################################### [postinstall] namespace.default.isolated = false -namespace.default.search.paths = /system/${LIB} -namespace.default.search.paths += /product/${LIB} +namespace.default.search.paths = /system/${LIB} |