blob: ba96cc84abe1e2df966e890f196b18fbde3ed65b [file] [log] [blame]
Justin Yun24c29f12017-06-16 18:11:35 +09001# 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 Morelandab338c12017-11-28 12:41:56 -08007# absolute path of an executable is selected.
Justin Yun24c29f12017-06-16 18:11:35 +09008dir.system = /system/bin/
9dir.system = /system/xbin/
Jiyong Park2498e1b2017-12-12 22:11:47 +090010
11dir.vendor = /odm/bin/
Justin Yun24c29f12017-06-16 18:11:35 +090012dir.vendor = /vendor/bin/
Jiyong Park2498e1b2017-12-12 22:11:47 +090013dir.vendor = /data/nativetest/odm
14dir.vendor = /data/nativetest64/odm
15dir.vendor = /data/benchmarktest/odm
16dir.vendor = /data/benchmarktest64/odm
Justin Yun24c29f12017-06-16 18:11:35 +090017dir.vendor = /data/nativetest/vendor
18dir.vendor = /data/nativetest64/vendor
19dir.vendor = /data/benchmarktest/vendor
20dir.vendor = /data/benchmarktest64/vendor
Jiyong Park2498e1b2017-12-12 22:11:47 +090021
Justin Yun24c29f12017-06-16 18:11:35 +090022dir.system = /data/nativetest
23dir.system = /data/nativetest64
24dir.system = /data/benchmarktest
25dir.system = /data/benchmarktest64
26
Jiyong Parkd7e6cb22018-03-20 01:12:31 +090027dir.postinstall = /postinstall
28
Justin Yun24c29f12017-06-16 18:11:35 +090029[system]
30additional.namespaces = sphal,vndk,rs
31
32###############################################################################
33# "default" namespace
34#
Jiyong Park55f05d72017-08-28 14:42:49 +090035# Framework-side code runs in this namespace. Libs from /vendor partition
Justin Yun24c29f12017-06-16 18:11:35 +090036# can't be loaded in this namespace.
37###############################################################################
Jiyong Park55f05d72017-08-28 14:42:49 +090038namespace.default.isolated = true
Justin Yun24c29f12017-06-16 18:11:35 +090039
Jiyong Park2498e1b2017-12-12 22:11:47 +090040namespace.default.search.paths = /system/${LIB}
41
42# We can't have entire /system/${LIB} as permitted paths because doing so
43# makes it possible to load libs in /system/${LIB}/vndk* directories by
44# their absolute paths (e.g. dlopen("/system/lib/vndk/libbase.so");).
45# VNDK libs are built with previous versions of Android and thus must not be
46# loaded into this namespace where libs built with the current version of
47# Android are loaded. Mixing the two types of libs in the same namespace can
48# cause unexpected problem.
49namespace.default.permitted.paths = /system/${LIB}/drm
50namespace.default.permitted.paths += /system/${LIB}/extractors
51namespace.default.permitted.paths += /system/${LIB}/hw
52# These are where odex files are located. libart has to be able to dlopen the files
53namespace.default.permitted.paths += /system/framework
54namespace.default.permitted.paths += /system/app
55namespace.default.permitted.paths += /system/priv-app
56namespace.default.permitted.paths += /vendor/framework
57namespace.default.permitted.paths += /vendor/app
58namespace.default.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080059namespace.default.permitted.paths += /odm/framework
60namespace.default.permitted.paths += /odm/app
61namespace.default.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090062namespace.default.permitted.paths += /oem/app
Jaekyun Seokdff165d2017-11-28 12:10:10 +090063namespace.default.permitted.paths += /product/framework
64namespace.default.permitted.paths += /product/app
65namespace.default.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090066namespace.default.permitted.paths += /data
67namespace.default.permitted.paths += /mnt/expand
68
69namespace.default.asan.search.paths = /data/asan/system/${LIB}
70namespace.default.asan.search.paths += /system/${LIB}
71
72namespace.default.asan.permitted.paths = /data
73namespace.default.asan.permitted.paths += /system/${LIB}/drm
74namespace.default.asan.permitted.paths += /system/${LIB}/extractors
75namespace.default.asan.permitted.paths += /system/${LIB}/hw
76namespace.default.asan.permitted.paths += /system/framework
77namespace.default.asan.permitted.paths += /system/app
78namespace.default.asan.permitted.paths += /system/priv-app
79namespace.default.asan.permitted.paths += /vendor/framework
80namespace.default.asan.permitted.paths += /vendor/app
81namespace.default.asan.permitted.paths += /vendor/priv-app
Bowgo Tsai39476ff2018-03-14 16:19:03 +080082namespace.default.asan.permitted.paths += /odm/framework
83namespace.default.asan.permitted.paths += /odm/app
84namespace.default.asan.permitted.paths += /odm/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090085namespace.default.asan.permitted.paths += /oem/app
Jaekyun Seokdff165d2017-11-28 12:10:10 +090086namespace.default.asan.permitted.paths += /product/framework
87namespace.default.asan.permitted.paths += /product/app
88namespace.default.asan.permitted.paths += /product/priv-app
Jiyong Park2498e1b2017-12-12 22:11:47 +090089namespace.default.asan.permitted.paths += /mnt/expand
Justin Yun24c29f12017-06-16 18:11:35 +090090
91###############################################################################
92# "sphal" namespace
93#
94# SP-HAL(Sameprocess-HAL)s are the only vendor libraries that are allowed to be
95# loaded inside system processes. libEGL_<chipset>.so, libGLESv2_<chipset>.so,
96# android.hardware.graphics.mapper@2.0-impl.so, etc are SP-HALs.
97#
98# This namespace is exclusivly for SP-HALs. When the framework tries to dynami-
99# cally load SP-HALs, android_dlopen_ext() is used to explicitly specifying
100# that they should be searched and loaded from this namespace.
101#
102# Note that there is no link from the default namespace to this namespace.
103###############################################################################
104namespace.sphal.isolated = true
105namespace.sphal.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900106
Jiyong Park2498e1b2017-12-12 22:11:47 +0900107namespace.sphal.search.paths = /odm/${LIB}
108namespace.sphal.search.paths += /vendor/${LIB}
109
110namespace.sphal.permitted.paths = /odm/${LIB}
111namespace.sphal.permitted.paths += /vendor/${LIB}
112
113namespace.sphal.asan.search.paths = /data/asan/odm/${LIB}
114namespace.sphal.asan.search.paths += /odm/${LIB}
115namespace.sphal.asan.search.paths += /data/asan/vendor/${LIB}
116namespace.sphal.asan.search.paths += /vendor/${LIB}
117
118namespace.sphal.asan.permitted.paths = /data/asan/odm/${LIB}
119namespace.sphal.asan.permitted.paths += /odm/${LIB}
120namespace.sphal.asan.permitted.paths += /data/asan/vendor/${LIB}
121namespace.sphal.asan.permitted.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900122
123# Once in this namespace, access to libraries in /system/lib is restricted. Only
124# libs listed here can be used.
125namespace.sphal.links = default,vndk,rs
126
Jiyong Park2498e1b2017-12-12 22:11:47 +0900127namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%
128namespace.sphal.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900129
Jiyong Park36798462017-08-04 19:08:06 +0900130namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900131
132# Renderscript gets separate namespace
133namespace.sphal.link.rs.shared_libs = libRS_internal.so
134
135###############################################################################
136# "rs" namespace
137#
138# This namespace is exclusively for Renderscript internal libraries.
139# This namespace has slightly looser restriction than the vndk namespace because
140# of the genuine characteristics of Renderscript; /data is in the permitted path
141# to load the compiled *.so file and libmediandk.so can be used here.
142###############################################################################
143namespace.rs.isolated = true
144namespace.rs.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900145
Jiyong Park60a29662017-12-13 16:59:21 +0900146namespace.rs.search.paths = /odm/${LIB}/vndk-sp
147namespace.rs.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900148namespace.rs.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900149namespace.rs.search.paths += /odm/${LIB}
150namespace.rs.search.paths += /vendor/${LIB}
151
152namespace.rs.permitted.paths = /odm/${LIB}
153namespace.rs.permitted.paths += /vendor/${LIB}
154namespace.rs.permitted.paths += /data
155
Jiyong Park60a29662017-12-13 16:59:21 +0900156namespace.rs.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
157namespace.rs.asan.search.paths += /odm/${LIB}/vndk-sp
158namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
159namespace.rs.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900160namespace.rs.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
161namespace.rs.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900162namespace.rs.asan.search.paths += /data/asan/odm/${LIB}
163namespace.rs.asan.search.paths += /odm/${LIB}
164namespace.rs.asan.search.paths += /data/asan/vendor/${LIB}
165namespace.rs.asan.search.paths += /vendor/${LIB}
166
167namespace.rs.asan.permitted.paths = /data/asan/odm/${LIB}
168namespace.rs.asan.permitted.paths += /odm/${LIB}
169namespace.rs.asan.permitted.paths += /data/asan/vendor/${LIB}
170namespace.rs.asan.permitted.paths += /vendor/${LIB}
171namespace.rs.asan.permitted.paths += /data
Justin Yun24c29f12017-06-16 18:11:35 +0900172
173namespace.rs.links = default,vndk
Jiyong Park2498e1b2017-12-12 22:11:47 +0900174
175namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%
176namespace.rs.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900177# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
178# namespace because RS framework libs are using them.
179namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900180
Jiyong Park36798462017-08-04 19:08:06 +0900181namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900182
183###############################################################################
184# "vndk" namespace
185#
186# This namespace is exclusively for vndk-sp libs.
187###############################################################################
188namespace.vndk.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +0900189namespace.vndk.visible = true
Justin Yun24c29f12017-06-16 18:11:35 +0900190
Jiyong Park60a29662017-12-13 16:59:21 +0900191namespace.vndk.search.paths = /odm/${LIB}/vndk-sp
192namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900193namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900194
195namespace.vndk.permitted.paths = /odm/${LIB}/hw
196namespace.vndk.permitted.paths += /odm/${LIB}/egl
197namespace.vndk.permitted.paths += /vendor/${LIB}/hw
198namespace.vndk.permitted.paths += /vendor/${LIB}/egl
199# This is exceptionally required since android.hidl.memory@1.0-impl.so is here
Justin Yuncbbf1952018-01-16 11:46:21 +0900200namespace.vndk.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Jiyong Park2498e1b2017-12-12 22:11:47 +0900201
Jiyong Park60a29662017-12-13 16:59:21 +0900202namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk-sp
203namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
204namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
205namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
Justin Yuncbbf1952018-01-16 11:46:21 +0900206namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
207namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Jiyong Park2498e1b2017-12-12 22:11:47 +0900208
209namespace.vndk.asan.permitted.paths = /data/asan/odm/${LIB}/hw
210namespace.vndk.asan.permitted.paths += /odm/${LIB}/hw
211namespace.vndk.asan.permitted.paths += /data/asan/odm/${LIB}/egl
212namespace.vndk.asan.permitted.paths += /odm/${LIB}/egl
213namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/hw
214namespace.vndk.asan.permitted.paths += /vendor/${LIB}/hw
215namespace.vndk.asan.permitted.paths += /data/asan/vendor/${LIB}/egl
216namespace.vndk.asan.permitted.paths += /vendor/${LIB}/egl
217
Justin Yuncbbf1952018-01-16 11:46:21 +0900218namespace.vndk.asan.permitted.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%/hw
219namespace.vndk.asan.permitted.paths += /system/${LIB}/vndk-sp%VNDK_VER%/hw
Justin Yun24c29f12017-06-16 18:11:35 +0900220
Logan Chien86677472018-03-29 14:08:48 +0800221# The "vndk" namespace links to "default" namespace for LLNDK libs and links to
222# "sphal" namespace for vendor libs. The ordering matters. The "default"
223# namespace has higher priority than the "sphal" namespace.
224namespace.vndk.links = default,sphal
225
Justin Yun24c29f12017-06-16 18:11:35 +0900226# When these NDK libs are required inside this namespace, then it is redirected
227# to the default namespace. This is possible since their ABI is stable across
228# Android releases.
Jiyong Park2498e1b2017-12-12 22:11:47 +0900229namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%
230namespace.vndk.link.default.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900231
Logan Chien86677472018-03-29 14:08:48 +0800232# Allow VNDK-SP extensions to use vendor libraries
233namespace.vndk.link.sphal.allow_all_shared_libs = true
234
Justin Yun24c29f12017-06-16 18:11:35 +0900235###############################################################################
236# Namespace config for vendor processes. In O, no restriction is enforced for
237# them. However, in O-MR1, access to /system/${LIB} will not be allowed to
238# the default namespace. 'system' namespace will be added to give limited
239# (LL-NDK only) access.
240###############################################################################
241[vendor]
Logan Chien225b71d2017-12-15 22:19:57 +0800242additional.namespaces = system,vndk
Justin Yun24c29f12017-06-16 18:11:35 +0900243
244###############################################################################
245# "default" namespace
246#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900247# This is the default linker namespace for a vendor process (a process started
248# from /vendor/bin/*). The main executable and the libs under /vendor/lib[64]
249# are loaded directly into this namespace. However, other libs under the system
250# partition (VNDK and LLNDK libraries) are not loaded here but from the
251# separate namespace 'system'. The delegation to the system namespace is done
252# via the 'namespace.default.link.system.shared_libs' property below.
Justin Yun24c29f12017-06-16 18:11:35 +0900253###############################################################################
254namespace.default.isolated = true
255namespace.default.visible = true
256
Jiyong Park2498e1b2017-12-12 22:11:47 +0900257namespace.default.search.paths = /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900258namespace.default.search.paths += /vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900259
Jiyong Park2498e1b2017-12-12 22:11:47 +0900260namespace.default.permitted.paths = /odm
261namespace.default.permitted.paths += /vendor
262
263namespace.default.asan.search.paths = /data/asan/odm/${LIB}
264namespace.default.asan.search.paths += /odm/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900265namespace.default.asan.search.paths += /data/asan/vendor/${LIB}
266namespace.default.asan.search.paths += /vendor/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900267
Jiyong Park2498e1b2017-12-12 22:11:47 +0900268namespace.default.asan.permitted.paths = /data/asan/odm
269namespace.default.asan.permitted.paths += /odm
270namespace.default.asan.permitted.paths += /data/asan/vendor
271namespace.default.asan.permitted.paths += /vendor
Justin Yun24c29f12017-06-16 18:11:35 +0900272
Logan Chien225b71d2017-12-15 22:19:57 +0800273namespace.default.links = system,vndk
274namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%
275namespace.default.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
276namespace.default.link.vndk.shared_libs += %VNDK_CORE_LIBRARIES%
277
278###############################################################################
279# "vndk" namespace
280#
281# This namespace is where VNDK and VNDK-SP libraries are loaded for
282# a vendor process.
283###############################################################################
284namespace.vndk.isolated = false
285
Logan Chien91b3fb42018-01-11 20:00:37 +0800286namespace.vndk.search.paths = /odm/${LIB}/vndk
287namespace.vndk.search.paths += /odm/${LIB}/vndk-sp
288namespace.vndk.search.paths += /vendor/${LIB}/vndk
289namespace.vndk.search.paths += /vendor/${LIB}/vndk-sp
290namespace.vndk.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900291namespace.vndk.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800292
Logan Chien91b3fb42018-01-11 20:00:37 +0800293namespace.vndk.asan.search.paths = /data/asan/odm/${LIB}/vndk
294namespace.vndk.asan.search.paths += /odm/${LIB}/vndk
295namespace.vndk.asan.search.paths += /data/asan/odm/${LIB}/vndk-sp
296namespace.vndk.asan.search.paths += /odm/${LIB}/vndk-sp
297namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk
298namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk
299namespace.vndk.asan.search.paths += /data/asan/vendor/${LIB}/vndk-sp
300namespace.vndk.asan.search.paths += /vendor/${LIB}/vndk-sp
301namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk-sp%VNDK_VER%
Justin Yuncbbf1952018-01-16 11:46:21 +0900302namespace.vndk.asan.search.paths += /system/${LIB}/vndk-sp%VNDK_VER%
303namespace.vndk.asan.search.paths += /data/asan/system/${LIB}/vndk%VNDK_VER%
304namespace.vndk.asan.search.paths += /system/${LIB}/vndk%VNDK_VER%
Logan Chien225b71d2017-12-15 22:19:57 +0800305
306# When these NDK libs are required inside this namespace, then it is redirected
307# to the system namespace. This is possible since their ABI is stable across
308# Android releases.
Logan Chienea4a2bd2018-01-18 12:06:14 +0800309namespace.vndk.links = system,default
Logan Chien225b71d2017-12-15 22:19:57 +0800310namespace.vndk.link.system.shared_libs = %LLNDK_LIBRARIES%
311namespace.vndk.link.system.shared_libs += %SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900312
Logan Chienea4a2bd2018-01-18 12:06:14 +0800313namespace.vndk.link.default.allow_all_shared_libs = true
314
Justin Yun24c29f12017-06-16 18:11:35 +0900315###############################################################################
316# "system" namespace
317#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900318# This namespace is where system libs (VNDK and LLNDK libs) are loaded for
319# a vendor process.
Justin Yun24c29f12017-06-16 18:11:35 +0900320###############################################################################
321namespace.system.isolated = false
Justin Yun24c29f12017-06-16 18:11:35 +0900322
Logan Chien225b71d2017-12-15 22:19:57 +0800323namespace.system.search.paths = /system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900324
Logan Chien225b71d2017-12-15 22:19:57 +0800325namespace.system.asan.search.paths = /data/asan/system/${LIB}
Jiyong Park2498e1b2017-12-12 22:11:47 +0900326namespace.system.asan.search.paths += /system/${LIB}
Jiyong Parkd7e6cb22018-03-20 01:12:31 +0900327
328###############################################################################
329# Namespace config for binaries under /postinstall.
330# Only one default namespace is defined and it has no directories other than
331# /system/lib in the search paths. This is because linker calls realpath on the
332# search paths and this causes selinux denial if the paths (/vendor, /odm) are
333# not allowed to the poinstall binaries. There is no reason to allow the
334# binaries to access the paths.
335###############################################################################
336[postinstall]
337namespace.default.isolated = false
338namespace.default.search.paths = /system/${LIB}