Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 1 | # Copyright (C) 2017 The Android Open Source Project |
| 2 | # |
| 3 | # Bionic loader config file. |
| 4 | # |
| 5 | |
| 6 | # Don't change the order here. The first pattern that matches with the |
Steven Moreland | ab338c1 | 2017-11-28 12:41:56 -0800 | [diff] [blame] | 7 | # absolute path of an executable is selected. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 8 | dir.system = /system/bin/ |
| 9 | dir.system = /system/xbin/ |
| 10 | dir.vendor = /vendor/bin/ |
| 11 | dir.vendor = /data/nativetest/vendor |
| 12 | dir.vendor = /data/nativetest64/vendor |
| 13 | dir.vendor = /data/benchmarktest/vendor |
| 14 | dir.vendor = /data/benchmarktest64/vendor |
| 15 | dir.system = /data/nativetest |
| 16 | dir.system = /data/nativetest64 |
| 17 | dir.system = /data/benchmarktest |
| 18 | dir.system = /data/benchmarktest64 |
| 19 | |
| 20 | [system] |
| 21 | additional.namespaces = sphal,vndk,rs |
| 22 | |
| 23 | ############################################################################### |
| 24 | # "default" namespace |
| 25 | # |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 26 | # Framework-side code runs in this namespace. Libs from /vendor partition |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 27 | # can't be loaded in this namespace. |
| 28 | ############################################################################### |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 29 | namespace.default.isolated = true |
Jiyong Park | a07f305 | 2017-08-22 10:26:10 +0900 | [diff] [blame] | 30 | namespace.default.search.paths = /system/${LIB} |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 31 | # /vendor/app, /vendor/framework were added since libart should be able to dlopen |
| 32 | # the odex files from the directory. |
| 33 | namespace.default.permitted.paths = /system/${LIB}/drm:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/data:/mnt/expand |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 34 | |
Jiyong Park | a07f305 | 2017-08-22 10:26:10 +0900 | [diff] [blame] | 35 | namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB} |
Jiyong Park | 55f05d7 | 2017-08-28 14:42:49 +0900 | [diff] [blame] | 36 | namespace.default.asan.permitted.paths = /data:/system/${LIB}/drm:/system/${LIB}/hw:/system/framework:/system/app:/system/priv-app:/vendor/app:/vendor/framework:/oem/app:/mnt/expand |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 37 | |
| 38 | ############################################################################### |
| 39 | # "sphal" namespace |
| 40 | # |
| 41 | # SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be |
| 42 | # loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so, |
| 43 | # android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs. |
| 44 | # |
| 45 | # This namespace is exclusivly for SP-HALs. When the framework tries to dynami- |
| 46 | # cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying |
| 47 | # that they should be searched and loaded from this namespace. |
| 48 | # |
| 49 | # Note that there is no link from the default namespace to this namespace. |
| 50 | ############################################################################### |
| 51 | namespace.sphal.isolated = true |
| 52 | namespace.sphal.visible = true |
| 53 | namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB} |
Sundong Ahn | e93d7f9 | 2017-10-10 14:05:24 +0900 | [diff] [blame] | 54 | namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp${VNDK_VER}/hw |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 55 | |
| 56 | namespace.sphal.asan.search.paths = /data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}:/vendor/${LIB} |
| 57 | namespace.sphal.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB} |
| 58 | |
| 59 | # Once in this namespace, access to libraries in /system/lib is restricted. Only |
| 60 | # libs listed here can be used. |
| 61 | namespace.sphal.links = default,vndk,rs |
| 62 | |
| 63 | # WARNING: only NDK libs can be listed here. |
Jiyong Park | faefa6b | 2017-08-31 16:42:23 +0900 | [diff] [blame] | 64 | namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 65 | |
| 66 | # WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line. |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 67 | namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 68 | |
| 69 | # Renderscript gets separate namespace |
| 70 | namespace.sphal.link.rs.shared_libs = libRS_internal.so |
| 71 | |
| 72 | ############################################################################### |
| 73 | # "rs" namespace |
| 74 | # |
| 75 | # This namespace is exclusively for Renderscript internal libraries. |
| 76 | # This namespace has slightly looser restriction than the vndk namespace because |
| 77 | # of the genuine characteristics of Renderscript; /data is in the permitted path |
| 78 | # to load the compiled *.so file and libmediandk.so can be used here. |
| 79 | ############################################################################### |
| 80 | namespace.rs.isolated = true |
| 81 | namespace.rs.visible = true |
Sundong Ahn | e93d7f9 | 2017-10-10 14:05:24 +0900 | [diff] [blame] | 82 | namespace.rs.search.paths = /vendor/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER}:/vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 83 | namespace.rs.permitted.paths = /vendor/${LIB}:/data |
| 84 | |
Sundong Ahn | e93d7f9 | 2017-10-10 14:05:24 +0900 | [diff] [blame] | 85 | namespace.rs.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp${VNDK_VER}:/vendor/${LIB}/vndk-sp${VNDK_VER}:/data/asan/system/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER}:/data/asan/vendor/${LIB}:/vendor/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 86 | namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data |
| 87 | |
| 88 | namespace.rs.links = default,vndk |
Jiyong Park | faefa6b | 2017-08-31 16:42:23 +0900 | [diff] [blame] | 89 | namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES% |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 90 | # Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this |
| 91 | # namespace because RS framework libs are using them. |
| 92 | namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES% |
Jiyong Park | 3679846 | 2017-08-04 19:08:06 +0900 | [diff] [blame] | 93 | namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 94 | |
| 95 | ############################################################################### |
| 96 | # "vndk" namespace |
| 97 | # |
| 98 | # This namespace is exclusively for vndk-sp libs. |
| 99 | ############################################################################### |
| 100 | namespace.vndk.isolated = true |
Jiyong Park | a07f305 | 2017-08-22 10:26:10 +0900 | [diff] [blame] | 101 | namespace.vndk.visible = true |
Sundong Ahn | e93d7f9 | 2017-10-10 14:05:24 +0900 | [diff] [blame] | 102 | namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 103 | namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl |
| 104 | |
Sundong Ahn | e93d7f9 | 2017-10-10 14:05:24 +0900 | [diff] [blame] | 105 | namespace.vndk.asan.search.paths = /data/asan/vendor/${LIB}/vndk-sp${VNDK_VER}:/vendor/${LIB}/vndk-sp${VNDK_VER}:/data/asan/system/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 106 | namespace.vndk.asan.permitted.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl |
| 107 | |
| 108 | # When these NDK libs are required inside this namespace, then it is redirected |
| 109 | # to the default namespace. This is possible since their ABI is stable across |
| 110 | # Android releases. |
| 111 | namespace.vndk.links = default |
Jiyong Park | faefa6b | 2017-08-31 16:42:23 +0900 | [diff] [blame] | 112 | namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 113 | |
| 114 | ############################################################################### |
| 115 | # Namespace config for vendor processes. In O, no restriction is enforced for |
| 116 | # them. However, in O-MR1, access to /system/${LIB} will not be allowed to |
| 117 | # the default namespace. 'system' namespace will be added to give limited |
| 118 | # (LL-NDK only) access. |
| 119 | ############################################################################### |
| 120 | [vendor] |
| 121 | additional.namespaces = system |
| 122 | |
| 123 | ############################################################################### |
| 124 | # "default" namespace |
| 125 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 126 | # This is the default linker namespace for a vendor process (a process started |
| 127 | # from /vendor/bin/*). The main executable and the libs under /vendor/lib[64] |
| 128 | # are loaded directly into this namespace. However, other libs under the system |
| 129 | # partition (VNDK and LLNDK libraries) are not loaded here but from the |
| 130 | # separate namespace 'system'. The delegation to the system namespace is done |
| 131 | # via the 'namespace.default.link.system.shared_libs' property below. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 132 | ############################################################################### |
| 133 | namespace.default.isolated = true |
| 134 | namespace.default.visible = true |
| 135 | |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 136 | namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/vendor/${LIB}/vndk${VNDK_VER}:/vendor/${LIB}/vndk-sp${VNDK_VER} |
| 137 | namespace.default.permitted.paths = /vendor |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 138 | |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 139 | namespace.default.asan.search.paths = /data/asan/vendor/${LIB}/hw:/vendor/${LIB}/hw:/data/asan/vendor/${LIB}/egl:/vendor/${LIB}/egl:/data/asan/vendor/${LIB}:/vendor/${LIB}:/data/asan/vendor/${LIB}/vndk${VNDK_VER}:/vendor/${LIB}/vndk${VNDK_VER}:/data/asan/vendor/${LIB}/vndk-sp${VNDK_VER}:/vendor/${LIB}/vndk-sp${VNDK_VER}:namespace.default.asan.permitted.paths = /data/asan/vendor:/vendor |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 140 | |
| 141 | namespace.default.links = system |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 142 | namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%:%VNDK_SAMEPROCESS_LIBRARIES%:%VNDK_CORE_LIBRARIES% |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 143 | |
| 144 | ############################################################################### |
| 145 | # "system" namespace |
| 146 | # |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 147 | # This namespace is where system libs (VNDK and LLNDK libs) are loaded for |
| 148 | # a vendor process. |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 149 | ############################################################################### |
| 150 | namespace.system.isolated = false |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 151 | namespace.system.search.paths = /system/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk${VNDK_VER}:/system/${LIB} |
Justin Yun | 24c29f1 | 2017-06-16 18:11:35 +0900 | [diff] [blame] | 152 | |
Jiyong Park | ad7ddd5 | 2017-12-07 09:59:48 +0900 | [diff] [blame^] | 153 | namespace.system.asan.search.paths = /data/asan/system/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER}:/data/asan/system/${LIB}/vndk${VNDK_VER}:/system/${LIB}/vndk${VNDK_VER}:/data/asan/system/${LIB}:/system/${LIB} |