History log of /bionic/tests/dlext_private.h
Revision Date Author Comments
9ee4591cb4a23b3c1a899f5ae3e4d769d0ba5a15 17-Jan-2018 Logan Chien <loganchien@google.com> linker: Allow link namespaces without name filters

This commit allows users to create a link without soname filters between
two linker namespaces.

The motivation is to establish one-way shared library isolation. For
example, assume that there are two linker namespaces `default` and
`vndk`. We would like to limit the shared libraries that can be used by
the `default` namespace. In the meanwhile, we would like to allow the
`vndk` namespace to use shared libs from the `default` namespace if the
soname cannot be find in the search path or loaded sonames of the `vndk`
namespace.

shared_libs = %VNDK_CORE_LIBRARIES%
shared_libs += %VNDK_SAMEPROCESS_LIBRARIES%
vndk <-------------------------------------------- default
\_______________________________________________/^
allow_all_shared_libs = true

android_link_namespaces_all_libs() is added to libdl, but it is
versioned as LIBC_PRIVATE. android_link_namespaces_all_libs() is only
for unit tests.

Bug: 69824336

Test: adb shell /data/nativetest/linker-unit-tests/linker-unit-tests32
Test: adb shell /data/nativetest64/linker-unit-tests/linker-unit-tests64

Test: adb shell /data/nativetest/bionic-unit-tests/bionic-unit-tests
Test: adb shell /data/nativetest64/bionic-unit-tests/bionic-unit-tests

Test: Update /system/etc/ld.config*.txt and check whether the vndk
linker namespace of the vendor process can access the shared libs from
the default linker namespace.

Change-Id: I2879f0c5f5af60c7e56f8f743ebd2872e552286b
37b91af0f3590e577dfcef47899bca2c8f9aebf4 05-May-2017 Jiyong Park <jiyong@google.com> greylist is no longer enabled by default.

greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.

Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
(cherry picked from commit e8ffe56a9c2bacc6bd880238250ad61e2bbb257b)
e8ffe56a9c2bacc6bd880238250ad61e2bbb257b 05-May-2017 Jiyong Park <jiyong@google.com> greylist is no longer enabled by default.

greylist is needed only for application namepaces. Since we started using
linker-namesapces for vendors and other platform apps linker should not
enable greylist workaround by default.

Bug: http://b/37731053
Bug: https://issuetracker.google.com/38146125
Test: sailfish builds and boots
Test: bionic-unit-tests and linker-unit-tests pass
Change-Id: Iee83db6fb1ae754f5ade18491321d9bca3b5ead4
7a34b9d57a762ca7cd6b8d6b9f9fb45c2b991da7 03-Feb-2017 Dimitry Ivanov <dimitry@google.com> Replace public library list with shared lib sonames (part 2/2)

This commit updates interface of libdl.c.

1. android_init_namespaces is replaces with android_init_anonymous_namespace
2. added 2 arguments to android_create_namespace to specify linked namespace
and the list of shared libraries sonames.
3. symbol lookup does not get past boundary libraries (added check and test for it).

Bug: http://b/26833548
Bug: http://b/21879602
Test: bionic-unit-tests --gtest_filter=dl*:Dl*
Change-Id: I32921da487a02e5bd0d2fc528904d1228394bfb9
49cfc899a3708fae9175e44c0c02cd479fda8b36 13-May-2016 Dimitry Ivanov <dimitry@google.com> linker: Allow caller to specify parent namespace

This change enables apps to share libraries opened
with RTLD_GLOBAL between different classloader namespaces.

The new parameter to create_namespace allows native_loader
to instruct the linker to share libraries belonging to
global group from a specified namespace instead of
using the caller_ns.

Bug: http://b/28560538
Bug: https://code.google.com/p/android/issues/detail?id=208458
Change-Id: I5d0c62730bbed19cdeb16c7559c74aa262a2475f
(cherry picked from commit fc2da53440383fe1026e0eb287d643b577c2707d)
fc2da53440383fe1026e0eb287d643b577c2707d 13-May-2016 Dimitry Ivanov <dimitry@google.com> linker: Allow caller to specify parent namespace

This change enables apps to share libraries opened
with RTLD_GLOBAL between different classloader namespaces.

The new parameter to create_namespace allows native_loader
to instruct the linker to share libraries belonging to
global group from a specified namespace instead of
using the caller_ns.

Bug: http://b/28560538
Bug: https://code.google.com/p/android/issues/detail?id=208458
Change-Id: I5d0c62730bbed19cdeb16c7559c74aa262a2475f
19b669b00325bcbab4679c4e57c5d8d95f54decb 10-May-2016 Dimitry Ivanov <dimitry@google.com> Remove linker-namespace functions from the header

They are intended for platform use only and we shouldn't have them
in the public header file.

Bug: http://b/28174921
Change-Id: Ib9b3d0fa9442cfa2e784a693ad567d1444d774e5
(cherry picked from commit 41fd29532b52bb66e3e1f4620053713fd0299f6e)
41fd29532b52bb66e3e1f4620053713fd0299f6e 10-May-2016 Dimitry Ivanov <dimitry@google.com> Remove linker-namespace functions from the header

They are intended for platform use only and we shouldn't have them
in the public header file.

Bug: http://b/28174921
Change-Id: Ib9b3d0fa9442cfa2e784a693ad567d1444d774e5