blob: 3278ccf2f9d983e930d2dec8e7f0eb668af7ea16 [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/
10dir.vendor = /vendor/bin/
11dir.vendor = /data/nativetest/vendor
12dir.vendor = /data/nativetest64/vendor
13dir.vendor = /data/benchmarktest/vendor
14dir.vendor = /data/benchmarktest64/vendor
15dir.system = /data/nativetest
16dir.system = /data/nativetest64
17dir.system = /data/benchmarktest
18dir.system = /data/benchmarktest64
19
20[system]
21additional.namespaces = sphal,vndk,rs
22
23###############################################################################
24# "default" namespace
25#
Jiyong Park55f05d72017-08-28 14:42:49 +090026# Framework-side code runs in this namespace. Libs from /vendor partition
Justin Yun24c29f12017-06-16 18:11:35 +090027# can't be loaded in this namespace.
28###############################################################################
Jiyong Park55f05d72017-08-28 14:42:49 +090029namespace.default.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +090030namespace.default.search.paths = /system/${LIB}
Jiyong Park55f05d72017-08-28 14:42:49 +090031# /vendor/app, /vendor/framework were added since libart should be able to dlopen
32# the odex files from the directory.
33namespace.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 Yun24c29f12017-06-16 18:11:35 +090034
Jiyong Parka07f3052017-08-22 10:26:10 +090035namespace.default.asan.search.paths = /data/asan/system/${LIB}:/system/${LIB}
Jiyong Park55f05d72017-08-28 14:42:49 +090036namespace.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 Yun24c29f12017-06-16 18:11:35 +090037
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###############################################################################
51namespace.sphal.isolated = true
52namespace.sphal.visible = true
53namespace.sphal.search.paths = /vendor/${LIB}/egl:/vendor/${LIB}/hw:/vendor/${LIB}
Sundong Ahne93d7f92017-10-10 14:05:24 +090054namespace.sphal.permitted.paths = /vendor/${LIB}:/system/${LIB}/vndk-sp${VNDK_VER}/hw
Justin Yun24c29f12017-06-16 18:11:35 +090055
56namespace.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}
57namespace.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.
61namespace.sphal.links = default,vndk,rs
62
63# WARNING: only NDK libs can be listed here.
Jiyong Parkfaefa6b2017-08-31 16:42:23 +090064namespace.sphal.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +090065
66# WARNING: only VNDK-SP libs can be listed here. DO NOT EDIT this line.
Jiyong Park36798462017-08-04 19:08:06 +090067namespace.sphal.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +090068
69# Renderscript gets separate namespace
70namespace.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###############################################################################
80namespace.rs.isolated = true
81namespace.rs.visible = true
Sundong Ahne93d7f92017-10-10 14:05:24 +090082namespace.rs.search.paths = /vendor/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER}:/vendor/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +090083namespace.rs.permitted.paths = /vendor/${LIB}:/data
84
Sundong Ahne93d7f92017-10-10 14:05:24 +090085namespace.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 Yun24c29f12017-06-16 18:11:35 +090086namespace.rs.asan.permitted.paths = /data/asan/vendor/${LIB}:/vendor/${LIB}:/data
87
88namespace.rs.links = default,vndk
Jiyong Parkfaefa6b2017-08-31 16:42:23 +090089namespace.rs.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES%
Jiyong Parkad7ddd52017-12-07 09:59:48 +090090# Private LLNDK libs (e.g. libft2.so) are exceptionally allowed to this
91# namespace because RS framework libs are using them.
92namespace.rs.link.default.shared_libs += %PRIVATE_LLNDK_LIBRARIES%
Jiyong Park36798462017-08-04 19:08:06 +090093namespace.rs.link.vndk.shared_libs = %VNDK_SAMEPROCESS_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +090094
95###############################################################################
96# "vndk" namespace
97#
98# This namespace is exclusively for vndk-sp libs.
99###############################################################################
100namespace.vndk.isolated = true
Jiyong Parka07f3052017-08-22 10:26:10 +0900101namespace.vndk.visible = true
Sundong Ahne93d7f92017-10-10 14:05:24 +0900102namespace.vndk.search.paths = /vendor/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk-sp${VNDK_VER}
Justin Yun24c29f12017-06-16 18:11:35 +0900103namespace.vndk.permitted.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl
104
Sundong Ahne93d7f92017-10-10 14:05:24 +0900105namespace.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 Yun24c29f12017-06-16 18:11:35 +0900106namespace.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.
111namespace.vndk.links = default
Jiyong Parkfaefa6b2017-08-31 16:42:23 +0900112namespace.vndk.link.default.shared_libs = %LLNDK_LIBRARIES%:%SANITIZER_RUNTIME_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900113
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]
121additional.namespaces = system
122
123###############################################################################
124# "default" namespace
125#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900126# 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 Yun24c29f12017-06-16 18:11:35 +0900132###############################################################################
133namespace.default.isolated = true
134namespace.default.visible = true
135
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900136namespace.default.search.paths = /vendor/${LIB}/hw:/vendor/${LIB}/egl:/vendor/${LIB}:/vendor/${LIB}/vndk${VNDK_VER}:/vendor/${LIB}/vndk-sp${VNDK_VER}
137namespace.default.permitted.paths = /vendor
Justin Yun24c29f12017-06-16 18:11:35 +0900138
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900139namespace.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 Yun24c29f12017-06-16 18:11:35 +0900140
141namespace.default.links = system
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900142namespace.default.link.system.shared_libs = %LLNDK_LIBRARIES%:%VNDK_SAMEPROCESS_LIBRARIES%:%VNDK_CORE_LIBRARIES%
Justin Yun24c29f12017-06-16 18:11:35 +0900143
144###############################################################################
145# "system" namespace
146#
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900147# This namespace is where system libs (VNDK and LLNDK libs) are loaded for
148# a vendor process.
Justin Yun24c29f12017-06-16 18:11:35 +0900149###############################################################################
150namespace.system.isolated = false
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900151namespace.system.search.paths = /system/${LIB}/vndk-sp${VNDK_VER}:/system/${LIB}/vndk${VNDK_VER}:/system/${LIB}
Justin Yun24c29f12017-06-16 18:11:35 +0900152
Jiyong Parkad7ddd52017-12-07 09:59:48 +0900153namespace.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}