Commit graph

391 commits

Author SHA1 Message Date
Martin Stjernholm
9c72fb6f08 Merge changes from topic "art-without-bionic"
am: 0c100685dc

Change-Id: I814ac6be70ff8ec197b71d2b68578fba75ac3b4a
2019-09-02 03:46:05 -07:00
Martin Stjernholm
bb55e0776f Update paths and names for the new ART APEX.
am: df96e1f25c

Change-Id: I971a44846276c7e8432bf27fa9465c86f33a1cd2
2019-09-02 03:45:36 -07:00
Martin Stjernholm
df96e1f25c Update paths and names for the new ART APEX.
Test: Build & boot
Test: atest CtsJniTestCases
Bug: 135753770
Exempt-From-Owner-Approval: Approved internally
Change-Id: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
Merged-In: Ic59b7bc8aae7ce521cf3ec9df4ab72aa611d0b75
2019-08-30 17:47:31 +01:00
Martin Stjernholm
391332d276 Include com.android.runtime in the "runtime" linker namespace.
This is a temporary fix to keep the Bionic-associated libraries accessible
in the runtime namespace, pending a proper namespace split.

Test: Build & boot with taimen_hwasan-userdebug
Bug: 139408016
Bug: 139916951
Exempt-From-Owner-Approval: Approved internally
Change-Id: I27069b20f7c7068b931340f548b284ce1676466c
Merged-In: I27069b20f7c7068b931340f548b284ce1676466c
2019-08-30 17:47:31 +01:00
Jooyung Han
57b4d65eff Merge "ld.config.txt: remove link from rs to vndk"
am: 059b8dacfd

Change-Id: I647b726e70d2c0710b45b15f1bad08ebe2524b19
2019-08-29 09:40:42 -07:00
Jooyung Han
52c5aafb21 ld.config.txt: remove link from rs to vndk
Linker namespace 'rs' has /system/lib/vndk-sp in its search paths.
So we don't need to link 'rs' namespace to 'vndk' namespace.

Bug: 139706981
Test: run RS-using apps from Play
Change-Id: I14c1d6c4e7624bbd6551731ea88de1b4c2e5edb6
2019-08-22 12:18:16 +00:00
Jiyong Park
70961c7b9d Merge "neuralnetworks namespace links to system namespace in [vendor] section"
am: 12b0eb363d

Change-Id: I4186ec14731331410edad536f1d5b3250ecf41a1
2019-08-15 00:41:38 -07:00
Jiyong Park
1d89a7e899 neuralnetworks namespace links to system namespace in [vendor] section
This change fixes a bug that neuralnetworks namespace is linked to the
default namespace in [vendor] section. Default namespace is for
/vendor/lib in [vendor] section. System libraries are available in the
'system' namespace.

Bug: 139113342
Test: N/A
Change-Id: I1b6751e5e33522f9829f3d9ad7371efdce01b0f0
2019-08-15 09:48:07 +09:00
Kiyoung Kim
48a396b390 Merge "Remove unused link from postinstall section"
am: a91d84b6c4

Change-Id: I8c3b4df50daccc79e08726a175a3752fdc98e2e9
2019-08-13 22:52:03 -07:00
Kiyoung Kim
d3a3097927 Remove unused link from postinstall section
Linker ignores link configuration if either namespace is not valid.
However there was a link configuration from postinstall section which
target link namespace does not exist. Also, there was no binary within
postinstall from hwasan build (checked with bonito), so there may be no
usage for this section now. Removing this line for better human
readability, and behavior of the linker would be same as before.

Test: m -j && tested from cuttlefish
Change-Id: I0c7b2949d055ba767e1429238e8764ee7798fe44
2019-08-12 03:56:42 +00:00
Przemyslaw Szczepaniak
d91345d64c Merge "ld.config for com.android.neuralnetworks APEX."
am: 2f40aa0f60

Change-Id: I64f4f2253d0bf0f789f80a17cecb62ed7a2eb997
2019-07-24 02:25:36 -07:00
Przemyslaw Szczepaniak
0bb871dc9f ld.config for com.android.neuralnetworks APEX.
Makes updated libneuralnetworks.so in /apex/com.android.neuralnetworks/{LIB}
loadable from all relevant namespaces.

Test: Verified that right library is being loaded using lsof and
Test: verbose debug logs from bionic/ld.
Bug: 137320025
Change-Id: I38140bb9915a3f85f10456e15ed0f492dbdba802
2019-07-22 11:28:42 +01:00
Justin Yun
e0b1eb8d65 Merge "Rename product_services to system_ext"
am: 6da50e319c

Change-Id: If9eaecca2382b3ace74ae721e80d51c79bb9b0fb
2019-07-11 00:15:28 -07:00
Justin Yun
7eaf9b58ec Rename product_services to system_ext
Update ld.config.txt and init.

Bug: 134359158
Test: make && check boot and ld.config.txt file
Change-Id: Ie1dce42e690414fb45b26759506ea7f64d06740d
2019-07-09 23:34:17 +00:00
Peter Collingbourne
0070e92aff Merge "Link the sanitizer runtime libraries to the default unrestricted namespace." am: 2d620c00f3
am: 41e3b68758

Change-Id: Ie138c5a1373ded873c80312b101eb5738d99a80e
2019-06-13 23:58:03 -07:00
Peter Collingbourne
563ca38154 Link the sanitizer runtime libraries to the default unrestricted namespace.
Without this, binaries can't be run out of /data/local/tmp on a HWASANified
device.

Test: Chromium's /data/local/tmp/md5sum/md5sum_bin works on walleye_hwasan-userdebug
Change-Id: Ieceaab8aae0024864022ca42b38aa36e6212cf31
2019-06-13 18:50:46 -07:00
Jiyong Park
6b5f5a202d Merge "Add libcgrouprc to ld.config.txt." am: 210b56e9a8
am: 875326a506

Change-Id: I502624287fc3cbffb7364c0a6850bae3fc5080f6
2019-06-12 08:35:13 -07:00
Min Yun
d695733df9 Add libcgrouprc to ld.config.txt.
- In GSI, media.extractor has follow dependency.
media.extractor -> libmpeg2extractor (media ns) ->
libprocessgroup (media ns) -> libcgrouprc (default ns).
If libcgroupsrc can't link from libmpeg2extractor, media.extractor is crashed.

Test: media.extractor didn't die.
Bug: 134981805
Change-Id: I7d3e7e6477708a505b87a884e05cd719f5a3d496
2019-06-12 11:19:59 +09:00
Martin Stjernholm
308fa0b38d Merge "Update TODOs for ICU library links." am: b78de85272
am: 419a3fa241

Change-Id: Ia17d7b5e8a44395aa88d11b4b0fd77146c816a4c
2019-06-06 19:29:20 -07:00
Martin Stjernholm
0d28abc5b1 Update TODOs for ICU library links.
Test: Presubmit boot test
Bug: 120786417
Bug: 134659294
Change-Id: I362e0e67c5adfd510dda12bed52629af92bfcc3d
2019-06-06 14:11:04 +01:00
Peter Collingbourne
b9b9d3754c Merge "Link the "runtime" namespace to more namespaces." am: 3e48b66578
am: 1b9a1c20db

Change-Id: Ic33fc84d752fa3fd487401f348be38c7531bfdea
2019-05-20 21:51:24 -07:00
Peter Collingbourne
3e48b66578 Merge "Link the "runtime" namespace to more namespaces." 2019-05-21 02:29:46 +00:00
vichang
17db1bef04 Merge "Allow linking to libicuuc.so and libicui18n.so from executable in /data" am: de725e6e75
am: 5c75fb81e8

Change-Id: I7bc0ba6a06d7b32c6de61d14658c4c3e9f43d417
2019-05-20 03:08:58 -07:00
Alistair Strachan
85ee72f0ef Merge "Add asan.permitted.paths for the media namespace" into qt-dev
am: 9924f7ee2d

Change-Id: Ia49e3e6a5d3f49c53bbbcf5c6d8e412ae3e1285e
2019-05-16 07:55:56 -07:00
Jiyong Park
78e6b181ac Add asan.permitted.paths for the media namespace
Permitted paths were empty for ASAN builds with the media namespace.

Bug: 131625115
Test: no dlopen failure on libflacextractor.so in aosp_cf_x86_pasan
Change-Id: I90050fc54820ba68d64931412572f3b0954e6616
2019-05-15 12:41:01 +09:00
Victor Chang
0c7edece94 Allow linking to libicuuc.so and libicui18n.so from executable in /data
Executable in /data/ runs in default linker namespace, not
classloader namespace.
In Q, we moved libicuuc.so and libicui18n into the runtime
namespace, and allow linking from runtime namespace and classloader
namespace.

This change further allows linking from default namespace, and tries
to fix the regression temporarily.

Bug: 130788466
Test: The app issue is fixed after this CL
Change-Id: Ifae52b554124514e433cfe78875643a7450fbabd
2019-05-14 20:22:34 +01:00
Martin Stjernholm
2a371889e5 Merge "Reland: Fix libnativeloader to correctly link to the platform namespace." am: 2d3becd361
am: 547c7b6d44

Change-Id: I7d7f820443f1709b46a5ab7b368656b079529bbb
2019-05-02 03:56:36 -07:00
Peter Collingbourne
fb1c5a724e Link the "runtime" namespace to more namespaces.
The canonical location of the HWASAN runtime, an LL-NDK library, is being moved
to the runtime APEX. It is apparently the first LL-NDK library in the runtime
APEX that does not require a legacy symlink in /system/${LIB}. Therefore we
need to link the HWASAN runtime in the runtime namespace to various namespaces
so that the library can be loaded from outside of the namespace.

Also, add $SANITIZER_RUNTIME_LIBRARIES to
namespace.default.link.system.shared_libs. This is necessary because in
the accompanying Soong change, we cause the HWASAN runtime to be removed
from $LLNDK_LIBRARIES. In most cases, except for this one, this was a no-op
because we were already including both sets of libraries in shared_libs.

Change-Id: I67d64788855d28f3a156a1b9cf8a897617277730
2019-05-01 18:00:33 -07:00
Martin Stjernholm
c57ed29dd5 Reland: Fix libnativeloader to correctly link to the platform namespace.
This relands http://r.android.com/951440:

This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Test: lunch aosp_cf_x86_phone-eng;
  atest android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile \
    com.android.cts.dexmetadata.InstallDexMetadataHostTest#testProfileSnapshotAfterInstall \
    installd_dexopt_test
Bug: 130293232
Bug: 121117762
Change-Id: I3d9f2102a03e83843e15bc78b5ad347220c52769
2019-05-01 16:46:06 +01:00
Martin Stjernholm
74950c035d Merge "Add linker entries for the new libdexfiled_external.so." am: cc30f4d7dd
am: a36eda0e18

Change-Id: I0f260d303bb305500ea71d0e3158a7d76cc1e850
2019-05-01 07:55:44 -07:00
Martin Stjernholm
8a50dad467 Add linker entries for the new libdexfiled_external.so.
Follow up to http://r.android.com/943476. This library is only available in
debug builds of the Runtime APEX.

Test: Flash and boot with eng build
Change-Id: I260f9b838f44ba3f8976c117d9e42fc456239e88
2019-04-30 16:11:30 +01:00
Martin Stjernholm
8dc3adfb2c Merge "Revert "Fix libnativeloader to correctly link to the platform namespace."" am: 68cf801ad9
am: affe1f2617

Change-Id: Ide5ec7791838db081c666f7aa7a137a92e4be460
2019-04-29 17:41:28 -07:00
Martin Stjernholm
b9259a9cbe Revert "Fix libnativeloader to correctly link to the platform namespace."
This reverts commit 4ca0ca67bf.

Reason for revert: Breaks android.compilation.cts.AdbRootDependentCompilationTest#testCompile_curProfile and others: http://g/art-team/R2nEDA1Ka_s

Change-Id: Ia6285648133d21e61040efafc73cac97d702a7c4
2019-04-29 20:57:16 +00:00
Martin Stjernholm
71a0804f95 Merge "Fix libnativeloader to correctly link to the platform namespace." am: bce25d2363
am: 487b5784b6

Change-Id: I8b96f74250d2dc2f42e2392c8b8705e5d3fd95bc
2019-04-29 08:27:05 -07:00
Martin Stjernholm
4ca0ca67bf Fix libnativeloader to correctly link to the platform namespace.
This affected binaries in the Runtime APEX, where the platform namespace is
"platform" rather than "default".

Also extend ANDROID_ADDITIONAL_PUBLIC_LIBRARIES to create links to both to
platform and runtime namespaces, so that it can be used to open up access to
internal libraries in the Runtime APEX as well, which is used by ART gtests
and run tests.

Also update some comments in the ld.config*.txt files to accurately explain
why some namespaces need to be visible, and some other minor changes for
consistency. There are no semantically significant changes in those files.

Test: Flash and boot
Test: Run an ART run test with the internal libarttest.so library
Bug: 130293232
Bug: 121117762
Change-Id: I7ebaf5370dd0f533b1bb5f0e67e7c3c1df48e512
2019-04-29 13:09:08 +01:00
Dongwon Kang
b0bdf2685b Merge "Fix a warning on namespace.media.link.default.shared_libs" am: 4b43299132
am: 47a38645c4

Change-Id: I9101d639351cfb184a4f7f049f1bad3a13c2f9d9
2019-04-24 16:36:39 -07:00
Dongwon Kang
5744cc4e99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
Merged-In: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 23:15:24 +00:00
Dongwon Kang
9d7a979a99 Fix a warning on namespace.media.link.default.shared_libs
Test: build & dumpsys media.extractor
Bug: 130882530
Change-Id: Ifd46858b5a864f0fbed87baa3321f233ea12954e
2019-04-23 14:56:21 -07:00
Dongwon Kang
f34a08f8b7 Merge "Remove libandroid.so from media namespace." into qt-dev
am: 2b107b8b6b

Change-Id: I5b83476196221d71db4137b4cbc2a3f5f786c3b3
2019-04-18 10:30:23 -07:00
Dongwon Kang
4b2b76e101 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: I6bcdac60a740d19a97bbac19e6339e0552b0d572
Merged-In: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 18:05:51 +00:00
Dongwon Kang
a8e4b89768 Remove libandroid.so from media namespace.
Test: adb shell dumpsys media.extractor
Bug: 130637522
Change-Id: Ia6366834613d1e12498fa90377e79f62a2149776
2019-04-17 10:47:33 -07:00
Martin Stjernholm
b6adac48f8 Merge "Describe the reason for the allow_all_shared_libs from the runtime namespace better." am: 8a9a1c5056
am: 49492bc586

Change-Id: Ie4f29ea47b8af4b8e9fd4f0deacbaf1d10b5ab4a
2019-04-12 09:07:23 -07:00
Martin Stjernholm
609236f66c Describe the reason for the allow_all_shared_libs from the runtime namespace
better.

Test: N/A - comment change only
Bug: 119867084
Change-Id: I80743236f95cedc43b8f80ac32a09ac0094f779e
2019-04-11 13:54:44 +01:00
Yifan Hong
bd5853cb48 Merge changes from topic "libprocessgroup_rc"
* changes:
  CgroupSetupCgroups -> CgroupSetup
  Add libcgrouprc to ld.config.*.txt.
  libprocessgroup: use libcgrouprc to read cgroup.rc
  libprocessgroup_setup: use libcgrouprc_format
  libprocessgroup: Move CgroupSetupCgroups() to libprocessgroup_setup
  libprocessgroup: Add libcgrouprc
  libprocessgroup: Add libcgrouprc_format
2019-04-03 16:41:21 +00:00
Yifan Hong
063b6beef0 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
Merged-In: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 22:31:57 -07:00
Yifan Hong
169a3e6095 Add libcgrouprc to ld.config.*.txt.
Test: boots (sanity)
Bug: 123664216
Change-Id: I23c3ece44816e4e213f9630b915e19978a259823
2019-04-02 17:34:37 -07:00
Jiyong Park
28429ff8c1 Merge "Search rs namespace prior to vndk namespace" am: 5ccb6a5cdc am: 8b524e9b45
am: deeedf9783

Change-Id: Id1f3e8d310bd1b8f3b7c67e0ab7485d96fd541bb
2019-04-02 01:47:06 -07:00
Jiyong Park
fa4971f3c3 Search rs namespace prior to vndk namespace
With the recent change that removed get_exported_namespace out of libdl,
the RenderScript SP-HAL stopped using android_dlopen_ext which it used
to load libRS_internal.so in the "rs" namespace. Instead, it now falls
back to the ordinary dlopen() call. The dlopen() call tries to load the
lib in the current namespace (which is sphal) and then falls back to the
linked namespaces: default, vndk, rs.

The problem is that rs is listed as the last namespace and therefore the
linker tries the namespace only when it failed to load the library in
other namespaces: default and vndk. libRS_internal.so is accessible to
both vndk and rs namespaces. So, the dlopen() call always goes into the
vndk namespace and there is no chance for the lib to be loaded in the rs
namespace.

To fix the problem, the rs namespace is placed before vndk so that the
namespace is tried first.

Bug: 129550847
Test: runtest -x cts/tests/camera/src/android/hardware/
Change-Id: Idafc32f8a309dd12495768931d7ea17a2f791c50
2019-04-02 02:43:23 +00:00
Martin Stjernholm
d2c8014b13 Merge "Apply the standard system linker config to all of /data." am: 60de348654 am: 0ec4836b71
am: e7540ff272

Change-Id: I928e2d7f4e274d753a23c7a10b647abefa6096b7
2019-03-28 05:59:01 -07:00
Martin Stjernholm
60de348654 Merge "Apply the standard system linker config to all of /data." 2019-03-28 12:37:29 +00:00