Commit Graph

1924 Commits

Author SHA1 Message Date
Bowgo Tsai 00749affc4 Adding /odm support
Treble system-as-root GSI needs to work on devices with and without /odm
partition. This change creates the following symlinks for devices without
/odm partition:

  /odm/app ->/vendor/odm/app
  /odm/bin ->/vendor/odm/bin
  /odm/etc ->/vendor/odm/etc
  /odm/firmware ->/vendor/odm/firmware
  /odm/framework ->/vendor/odm/framework
  /odm/lib -> /vendor/odm/lib
  /odm/lib64 -> /vendor/odm/lib64
  /odm/overlay -> /vendor/odm/overlay
  /odm/priv-app -> /vendor/odm/priv-app

For devices with odm partition, /odm will be used as the mount point and
those symlinks will be hidden after mount.

Bug: 70678783
Test: boot a A/B device without /odm partition, checks those symlinks exist
Test: boot a A/B device with /odm partition, checks those symlinks don't exist
Change-Id: I4d960b52e2754f461188f3ab562c751f502046ea
2018-03-09 17:34:29 +08:00
Luis Hector Chavez 0ee6c22f58 Merge "init.rc: Mount /mnt with nodev,nosuid,noexec" am: 6698482ca4 am: 0802d45683
am: cfd9a3af86

Change-Id: I9be6cffa4deb4df7c4b781e2900d7fa79fd558ca
2018-02-15 14:47:58 +00:00
Luis Hector Chavez b0d8b26e0f Merge "init.rc: Remount / with MS_REMOUNT|MS_BIND" am: 008576080e am: c37d85953e
am: 655d6d5451

Change-Id: Idb18188ad9b3b667411d428ae616498748b8281a
2018-02-15 14:43:04 +00:00
Treehugger Robot 7238eca684 Merge "init.rc: Add nodev,noexec,nosuid to /config" 2018-02-15 03:01:33 +00:00
Luis Hector Chavez 8774945036 init.rc: Add nodev,noexec,nosuid to /config
This change adds some additional flags to the /config mount. This is to
reduce the number of mounts with unnecessary privileges.

Bug: 73255020
Test: aosp_sailfish still boots
Test: CtsAppSecurityHostTestCases {ExternalStorageHostTest,StorageHostTest}
Merged-In: If3409d917cdf76a67ebfb7c4035a3ae8fee6189f
Change-Id: If3409d917cdf76a67ebfb7c4035a3ae8fee6189f
2018-02-14 20:58:56 +00:00
Luis Hector Chavez 465c8f307f init.rc: Add nodev,noexec,nosuid to /config
This change adds some additional flags to the /config mount. This is to
reduce the number of mounts with unnecessary privileges.

Bug: 73255020
Test: aosp_sailfish still boots
Test: CtsAppSecurityHostTestCases {ExternalStorageHostTest,StorageHostTest}
Change-Id: If3409d917cdf76a67ebfb7c4035a3ae8fee6189f
2018-02-14 12:55:48 -08:00
Luis Hector Chavez 081aa0a303 init.rc: Mount /mnt with nodev,nosuid,noexec
This change adds some additional flags to /mnt. This is to reduce
the number of mounts with unnecessary flags.

Bug: 73255020
Test: aosp_sailfish still boots
Test: CtsAppSecurityHostTestCases {StorageHostTest,ExternalStorageHostTest}
Test: CtsOsTestCases StorageManagerTest
Test: find /mnt  | egrep -v '^/mnt/runtime/(default|read|write)/emulated' | \
      xargs ls -lZd  # Shows no character devices or executable files
Change-Id: I54739133119d9626ebeb2ef9a1c127f7a90fa098
2018-02-14 20:51:40 +00:00
Luis Hector Chavez 30780a7305 init.rc: Remount / with MS_REMOUNT|MS_BIND
Since we only want to change the ro flag on / (and leave all other mount
flags alone), this can also be achieved by passing MS_REMOUNT|MS_BIND,
even if the mount is not a bind-mount.

This aims to make running Android within a user namespace easier, since
remounts without the MS_BIND flag are forbidden.

Bug: 73255020
Test: aosp_sailfish still boots
Test: rootfs on / type rootfs (rw,seclabel)
      /dev/root on / type ext4 (ro,seclabel,relatime,data=ordered)
Change-Id: I2f89a8badfc467db47304c9355648e8fd8ad1272
2018-02-14 20:51:06 +00:00
Justin Yun f88ab0b4ec Merge "Move libz to llndk from vndk-sp for non-VNDK-enforced devices." am: 524254f3df am: 7987a191f6
am: e86a98bfac

Change-Id: I894549e82aebc48e39133ccc9138410b7ce70c82
2018-02-14 09:45:46 +00:00
Justin Yun 8065a608a6 Move libz to llndk from vndk-sp for non-VNDK-enforced devices.
For non-VNDK-enforced devices, libz cannot be installed in vndk-sp
to avoid CTS test failure.
Move libz to llndk from vndk-sp for generating the namespace
configuration from ld.config.vndk_lite.txt.

Bug: 73296261
Test: run android.jni.cts test on marlin/sailfish
Change-Id: I1b8b43cd87dc8dfdd2667001ae1e50d9eaedf93d
2018-02-14 16:11:14 +09:00
Luis Hector Chavez 9420397267 Merge "init.rc: Perform some mounts with nodev,nosuid,noexec" am: cd66e4c6ea am: 8cb681fa1f
am: c876c660e0

Change-Id: I588550f4cad7e18067d916a6e1b4eed3b1fb2265
2018-02-13 23:07:24 +00:00
Luis Hector Chavez f8a7e37b2d init.rc: Perform some mounts with nodev,nosuid,noexec
This change adds some additional flags to some mounts. This is to reduce
the number of mounts with these flags.

Bug: 73255020
Test: aosp_sailfish still boots
Change-Id: I285e6d7b3dcc19f691a3d6780e7d3a3a5d7cb3de
2018-02-12 23:17:10 +00:00
Justin Yun eab887b60e Merge changes from topic "vndk-sp-list-update" am: 4c0ee1e8a0 am: 6edfca6e3b
am: 0d77d80aad

Change-Id: I366d50eee8edb40f243c551a2051d5efebdb3e72
2018-02-08 08:14:12 +00:00
Justin Yun 27bdc37fac Rename namespace configuration source files.
For strict VNDK runtime restriction, use ld.config.txt as a source
file. For treblized devices without BOARD_VNDK_VERSION, use
ld.config.vndk_lite.txt file.

Test: Build and boot on Pixel 2017 and 2018 devices.
Change-Id: Ie5b77facd4c11bc73219ecf13ad1298ac5d60d8e
2018-02-08 08:46:59 +09:00
Justin Yun 8a9a8eeb85 Use actual VNDK list for non-VNDK-enforcing devices
Rename ld.config.txt.in to ld.config.vndk.txt and
ld.config.txt to ld.config.vndk_light.txt.

For FULL_TREBLE devices without BOARD_VNDK_VERSION, update the VNDK
library list in ld.config.vndk_light.txt with the actual VNDK list.

Bug: 69526027
Test: Build marlin/sailfish and check boot
Change-Id: Idbb0cc97d11037c1493d4739e84961297ce51dbd
Merged-In: Idbb0cc97d11037c1493d4739e84961297ce51dbd
2018-02-08 08:33:15 +09:00
Justin Yun 181056b424 Use actual VNDK list for non-VNDK-enforcing devices
Rename ld.config.txt.in to ld.config.vndk.txt and
ld.config.txt to ld.config.vndk_light.txt.

For FULL_TREBLE devices without BOARD_VNDK_VERSION, update the VNDK
library list in ld.config.vndk_light.txt with the actual VNDK list.

Bug: 69526027
Test: Build marlin/sailfish and check boot
Change-Id: Idbb0cc97d11037c1493d4739e84961297ce51dbd
2018-02-07 05:36:51 +09:00
bohu 5b3196430b Merge "emulator: not start adbd upon ro.kernel.qemu=1" am: 7c271bdc3b am: 466b098b87
am: 83255e337a

Change-Id: I26732caa7cc8346e27ec4c8e4816b5cace2577cd
2018-02-05 06:39:23 +00:00
bohu b40193e50a emulator: not start adbd upon ro.kernel.qemu=1
clean up emulator specific rules.

BUG: 72900827

Change-Id: Ica60838562fd773bcde5752c11586183ce55b71a
2018-02-03 17:22:15 -08:00
Logan Chien 1519e3c9b3 Merge "ld.config.txt: Link vendor vndk ns to default ns" am: 1e11f5f709 am: 161efac4f0
am: f20d8a1f1e

Change-Id: I915c4409df864bbb69ccb9b8f684c98ce3a3892d
2018-01-26 05:02:45 +00:00
Logan Chien 1e11f5f709 Merge "ld.config.txt: Link vendor vndk ns to default ns" 2018-01-26 04:45:26 +00:00
Jaekyun Seok 207a211804 Merge "Support /product partition" am: 8f324542a2 am: 10e1ec7de3
am: 83ffef2cb1

Change-Id: Ia1933bbede3db2489151e5ab8ead574582b87f7a
2018-01-25 04:17:36 +00:00
Jaekyun Seok dff165d3a2 Support /product partition
This CL will enable reading /product/build.prop and add product paths
into ld.config.txt.in.

Bug: 64195575
Test: tested with 'PRODUCT_PRODUCT_PROPERTIES := ro.product.abc=abc' on
sailfish

Change-Id: Ie996def20e25dc1afe0c74af2096af844934b2dc
2018-01-25 09:37:20 +09:00
Andreas Huber a03134ea22 Fingerprint data is now stored in one of two ways depending on the
shipping API version:

For devices shipped before Android P nothing changes, data
is stored under /data/system/users/<user-id>/fpdata/...

Devices shipped from now on will instead store
fingerprint data under /data/vendor_de/<user-id>/fpdata.

Support for /data/vendor_de and /data/vendor_ce has been added to vold.

Bug: 36997597
Change-Id: I83f87e88d1731e515b459a3d6d5bf3104afe6cfe
Test: manually
2018-01-23 14:29:40 -08:00
Logan Chien ea4a2bdd44 ld.config.txt: Link vendor vndk ns to default ns
This commit links the vndk namespace of vendor processes to the default
namespace of vendor processes.  allow_all_shared_libs is specified so
that VNDK extensions can link with other vendor libraries in
/vendor/lib[64].

Bug: 69824336

Test: Create a vndk-ext lib that links to vendor lib and use that
vndk-ext lib in a vendor executable.

Change-Id: Ibd3dc2e5f0f2e6ff9fc9677c6bcfcf87a1a70e50
2018-01-23 11:02:54 +08:00
Logan Chien 736e4f1079 Merge "ld.config.txt: Move vendor vndk to vndk namespace" am: c6805c3e9c am: 0779a259b7
am: 5aa3d78ea7

Change-Id: I68cbb5429e57f6f2a72775c5fc50b4b5e20b8cd4
2018-01-23 02:56:28 +00:00
Logan Chien 91b3fb4f3f ld.config.txt: Move vendor vndk to vndk namespace
This commit moves /{odm,vendor}/lib[64]/vndk[-sp] to vndk namespace so
that vndk extension can override vndk libs from
/system/lib[64]/vndk[-sp].

Bug: 69824336

Test: Create libutils_ext locally and it can be called from
android.hardware.nfc@1.0-service.

Change-Id: Id63e58d665fa41eda85950ee1d16fe06c35cd7d3
2018-01-22 11:30:56 +08:00
Max Bires 905c99b80e Merge "Adding /data/local/traces for traceur app" am: 658e4ddd03 am: 69c428e5a6
am: cd4fa12263

Change-Id: I0ba68a132cc840b0d5b63a9d22b54276b8c168de
2018-01-20 01:02:10 +00:00
Treehugger Robot 658e4ddd03 Merge "Adding /data/local/traces for traceur app" 2018-01-20 00:51:30 +00:00
TreeHugger Robot 82b85d0b7c Merge "Change /configfs/sdcardfs to 0770" 2018-01-19 21:57:18 +00:00
Max Bires 181d11c5cb Adding /data/local/traces for traceur app
Traceur app is being split out of shell user. Previously it logged to
shell's bugreports directory. It no longer has access, so it needs a
new, user-friendly file location to store trace data.

Bug:68126425
Test: Traceur can write and shell can read from this directory
Change-Id: I9e344973fd43eb5699f7a848524e20b06458fb77
2018-01-19 09:37:44 -08:00
Justin Yun 93b1df1cd1 Merge "Add VNDK version suffix in ld.config.txt on build time." am: 447280cea0 am: 3060be356f
am: 5a31c03fa6

Change-Id: Ie58dca02b6f267b882b8f1f59cda57c141c8892c
2018-01-17 08:00:29 +00:00
Justin Yun cbbf195e46 Add VNDK version suffix in ld.config.txt on build time.
As we use different ld.config.txt per version, we don't need to
substitute the VNDK_VER on run time.
Remove all ${VNDK_VER} from the linker namespace configuration files.

Bug: 70603313
Test: build and boot GSI for walleye and sailfish
Change-Id: Ief8aee5c3308b2462cafaffc2423deda4e51a7bb
2018-01-17 12:14:25 +09:00
Oscar Shu 128274a3f2 Merge "Firmware dump create directory" am: da007e0deb am: b4d9751eab
am: b8deb4de2f

Change-Id: I3eba1b745d75d8cc0a3eba7cf0fea7ad54b992c2
2018-01-17 00:09:03 +00:00
Oscar Shu da007e0deb Merge "Firmware dump create directory" 2018-01-16 23:57:15 +00:00
Chenbo Feng dc95eeadf4 Merge "Mount eBPF file system and cgroupv2 root directory" am: 4719ecd28c am: 7a65861d7c
am: 94cff89571

Change-Id: Id2a58f55f16994dba0b6dbf86d4724943dbc8141
2018-01-16 22:15:25 +00:00
Chenbo Feng 2cba6f2e0e Mount eBPF file system and cgroupv2 root directory
Mount the eBPF file system under /sys/fs/bpf to allow netd to pin and
retrieve persistent eBPF map object from the file system. It helps the
system to maintain a consistent eBPF data store when netd crashed and
restart. Mount the cgroupv2 module and use the root folder of it to
monitor network statistics through eBPF program attached.

Test: eBPF map object show up under /sys/fs/bpf after netd start.
Bug: 30950746
Change-Id: Ie475112116603798fe75a75c5a84f4bbe5b942ec
2018-01-16 21:45:25 +00:00
Jeff Vander Stoep 538caefba9 Merge "OWNERS: add myself" am: 4ba3ebbc2f am: d64b97e0fd
am: 14bf561f03

Change-Id: Idf3ff9fe3089b8a9788cbe260e94456b680d1dc6
2018-01-16 20:54:47 +00:00
xshu 9a7a5b61c4 Firmware dump create directory
Setting up infanstructure for vendor tombstone in dir:
/data/vendor/tombstones

Wifi specific dumps will go into:
/data/vendor/tombstones/wifi

Bug: 70170285
Test: compile, run on device.
Change-Id: Ie16dd8236d9b5df19adb9818b4c62ce01e0d0b10
2018-01-16 19:10:57 +00:00
Jeff Vander Stoep e2f77d8ef1 OWNERS: add myself
Test: none
Change-Id: I150226c19370a2c5f06781003ec88befa0e91da7
2018-01-12 13:31:54 -08:00
Daniel Rosenberg 7903523015 Change /configfs/sdcardfs to 0770
Change-Id: I0a66f6b3ebc3dee398e4f23f5a58ebf7d62cc4c3
Bug: 69929297
Test: setenforce 0
      su
      mkdir /config/sdcardfs/test
      su u0_a0,u0_a0,u0_a0
      echo 10000 > /config/sdcardfs/test/appid
      Write should fail
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2018-01-10 17:43:51 -08:00
Justin Yun d7bfaea62b Merge "Do not append VNDK version if VNDK is not used" am: 4d281880e0 am: 9c378b0e37
am: 30ac0d7a27

Change-Id: I4493f92bf877d9a792837df5c062570f972a6901
2018-01-10 23:52:34 +00:00
Justin Yun dd16301bab Do not append VNDK version if VNDK is not used
If BOARD_VNDK_VERSION is not defined, ro.vndk.version will not be
set. In this case, the device, is not able to use versioned
configuration files.
Check BOARD_VNDK_VERSION to append the VNDK version to the namespace
configuration files.

Bug: 71730104
Test: Check boot on both 2016 and 2017 Pixel devices.
Change-Id: I1df27c75de42a526768a156387f22a934cda6d72
2018-01-11 08:29:54 +09:00
Siarhei Vishniakou 439efda1e7 Merge "Allow input system access to /dev/v4l-touch" am: f6363989f4 am: 31209d7ada
am: f82541140b

Change-Id: I7ea315e14fc97ade4f49293b13fc8438b4e19024
2018-01-09 22:11:48 +00:00
Treehugger Robot f6363989f4 Merge "Allow input system access to /dev/v4l-touch" 2018-01-09 21:45:52 +00:00
Justin Yun fc86b1fee0 Merge "Removed unused part in ld.config.txt.in" am: 8fa3e72846 am: 7b7339d339
am: ebf514bab3

Change-Id: Ib94c656453658409081f6820a5901ab75de8fa60
2018-01-09 20:17:50 +00:00
Justin Yun 939f06b429 Removed unused part in ld.config.txt.in
In the namespace with "isolated = false", "permitted.paths" is not
used.

Bug: 71727966
Test: walleye device boot
Change-Id: I6f624be3c4e2c4070bb784632d0757408ec12db0
2018-01-09 14:13:40 +09:00
Jeff Sharkey f431cd84e4 Merge changes from topic "resgidz" am: a7004e5fed am: b162da3a47
am: c16340c646

Change-Id: Iaf01b79c1e51f4cba06ee9ea6227c00a3cec4d4d
2018-01-09 01:49:29 +00:00
Steve Muckle a1c5978967 Merge "rootdir: make sure the /odm mountpoint is always available" am: fcec40de0b am: ada4b7782d
am: 34f29a86fd

Change-Id: Icbc30f9ed92163119307d7c5f25e06d9cd93e9a4
2018-01-09 01:22:16 +00:00
Jeff Sharkey a7004e5fed Merge changes from topic "resgidz"
* changes:
  Add reserved disk GID to critical component.
  Set reserved GID when setting reserved blocks.
  Allocate GID to use reserved disk space.
2018-01-08 18:17:50 +00:00
Jeff Sharkey 9410d572fb Add reserved disk GID to critical component.
We recently created a new GID that can be granted to critical system
processes, so that the system is usable enough for the user to free
up disk space used by abusive apps.

Test: builds, boots
Bug: 62024591
Change-Id: Ia5af7535cc05a214f8720ac08c594c6db888597a
2018-01-07 19:25:00 -07:00
Steve Muckle 1a3e3065fb rootdir: make sure the /odm mountpoint is always available
The odm partition will eventually be required. Prepare for this by
creating its mount point.

Bug: 37322799
Test: run cts-dev -m CtsPermissionTestCases
Change-Id: Ibd031b68dd7328c853ded401bb2690dbd6675141
2018-01-04 08:45:20 -08:00
Ricky Wai 02fbb27e73 Merge "Create Network Watchlist data folder for ConfigUpdater" 2018-01-03 14:16:41 +00:00
Siarhei Vishniakou 38d4352fce Allow input system access to /dev/v4l-touch
Bug: 62940136
Test: read /dev/v4l-touchX from inputflinger

Change-Id: I394686e4167855f50ddd6ff9aebcf3c94f6550b0
2017-12-22 17:06:24 -08:00
Logan Chien 2fd29edc71 Merge "Separate VNDK libs into another linker namespace" am: b00ed37a66 am: 3d5afa7b34
am: 2a736774dc

Change-Id: I11667b8f5e5bb450fb355fcfc6d1e533be78958c
2017-12-21 20:53:20 +00:00
Logan Chien b00ed37a66 Merge "Separate VNDK libs into another linker namespace" 2017-12-21 01:32:04 +00:00
Jiyong Park 3688e713e7 Merge "/vendor/lib/hw is removed from search paths for vendor default ns" am: 3388af49e6 am: 17f0ae765e
am: b7d35b7d09

Change-Id: Ib638acc46f3c96ca459755a06df977799dd90822
2017-12-20 02:29:47 +00:00
Treehugger Robot 3388af49e6 Merge "/vendor/lib/hw is removed from search paths for vendor default ns" 2017-12-20 02:19:14 +00:00
Jiyong Park 483cd2e2fe /vendor/lib/hw is removed from search paths for vendor default ns
Shared libraries in the directory should be dlopened with full file
paths. That was a workaround for some legacy prebuilt binaries and they
are all now fixed. Thus removing.

Bug: 70551668
Test: walleye, aosp_walleye, taimen, aosp_taimen boot to the UI

Change-Id: Ifb123b09c13f873cbefa7784e76dfe5f35575a8d
2017-12-19 21:43:25 +09:00
Logan Chien 225b71d8c5 Separate VNDK libs into another linker namespace
This commit extracts /system/lib[64]/vndk and /system/lib[64]/vndk-sp
into another namespace in the vendor section.  This commit is necessary
because LLNDK libraries (e.g. libc or libnativewindow) may otherwise
link to the shared libraries in /system/lib[64]/vndk-sp, which may be
older than the one LLNDK libraries built with.

Test: aosp_walleye boots
Bug: 70816018
Change-Id: I6fceb0da92c978ad940af91f5efe84e673c9247e
2017-12-19 15:29:48 +08:00
Jiyong Park 0327278abf Merge "Do not use versioned VNDK directory in vendor partition" am: 3459e5823e am: c56fafa4fc
am: 963685ed53

Change-Id: Ib19db37bdb6d030806f42ac9ecbeb88f71007456
2017-12-18 05:07:00 +00:00
Ricky Wai 88d5dcbd81 Create Network Watchlist data folder for ConfigUpdater
Bug: 63908748
Test: Able to boot

Change-Id: I8db6b5706cce17a60e2a7db9be80020f8681531d
2017-12-16 19:18:31 +00:00
Jiyong Park baca81639c Merge "Re-format ld.config.*.txt files" am: eef035f641 am: ca33a874fe
am: 6546c650fa

Change-Id: If26449caae94fb2e372c382d25033930f3c6d5b5
2017-12-15 01:06:13 +00:00
Jiyong Park 60a2966fc9 Do not use versioned VNDK directory in vendor partition
Paths for extended VNDK libs don't need version suffix, because there
always is the single version that the vendor(odm) modules are built
against.

Bug: 70601582
Test: walleye boots to the UI.
Test: No further test is possible since we don't have extended VNDK yet
in our source tree.

Change-Id: Idbf4bb820ddb136d00744f64ddf6ebe6442ad16e
2017-12-14 21:43:04 +09:00
Jiyong Park 2498e1b1d3 Re-format ld.config.*.txt files
Re-format the files by splitting lines using +=.

Also add /odm/${LIB} where needed.

A few directories that are no longer required are removed from the
search paths and permitted paths.

Test: walleye and sailfish boots to the UI, renderscript, camera,
camcodder, sound, etc. are working.

Change-Id: I3150f0c3d35130d6b1a665e3f0813d33b1b7f546
2017-12-14 21:43:04 +09:00
Logan Chien 97772e425b android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

[1] 79d13ff0f5

Bug: 69480083
Test: /system/lib64/vndk-sp/android.hardware.graphics.allocator@2.0.so
disappears.
Test: sailfish boots

Change-Id: I0e6518f169dd620d6b1a9ada47754e371ef4a739
Merged-In: I0e6518f169dd620d6b1a9ada47754e371ef4a739
(cherry picked from commit 9d898f3678)
2017-12-13 17:05:14 +09:00
Jiyong Park 52a2137d05 Merge "/vendor/priv-app is added to the permitted paths for the default ns" am: 5dde5e38d2 am: 3c28804815
am: d1a4cbd742

Change-Id: I0ca43f5107d451ecbdb1674fd1436292b9aa3506
2017-12-13 03:14:04 +00:00
Vishwath Mohan 3f663e0b29 Merge "Fix asan permitted paths in the default namespace." am: 32c03800c0 am: 22e81897b2
am: c75631bc5e

Change-Id: Ibf5767decc7e5b3b26b389e37caeab33f7986da3
2017-12-13 03:13:12 +00:00
Justin Yun 5029612451 Merge "Add VNDK version for namespace configuration files" am: a6e6780418 am: a159b310d6
am: 635ddcb894

Change-Id: I791663afc81779ce2306b909db46eb82e895a32c
2017-12-13 03:00:29 +00:00
Treehugger Robot 5dde5e38d2 Merge "/vendor/priv-app is added to the permitted paths for the default ns" 2017-12-13 02:34:19 +00:00
Vishwath Mohan 32c03800c0 Merge "Fix asan permitted paths in the default namespace." 2017-12-13 02:08:30 +00:00
Logan Chien bf24c70ad4 Merge "android.hardware.graphics.allocator@2.0 is no longer VNDK-SP" 2017-12-13 01:42:08 +00:00
Justin Yun 210ff9485d Add VNDK version for namespace configuration files
If PLATFORM_VNDK_VERSION is set to a version other than "current",
add the version to the file names of the namespace configuration
files.

Bug: 69883025
Test: device boot
Change-Id: I27377549581125b6c750c1422d0ee4a607dda5e8
2017-12-13 10:31:04 +09:00
Vishwath Mohan cede134907 Fix asan permitted paths in the default namespace.
This CL fixes an error with the asan permitted paths in
ld.config.txt.in.

Bug: 63927538
Test: lunch walleye_asan-userdebug && m -j40
Change-Id: Ica0504cb52ef6e6b3e4ce2deae3ce5984e38cc93
2017-12-12 16:17:41 -08:00
Jiyong Park 9c6587ad1f Merge "Use normalize-path-list" am: c034cd5d04 am: f01f51c41f
am: 4c550887a6

Change-Id: I8d6ef704857de733cdfd380fd28271329e206d3b
2017-12-12 08:13:46 +00:00
Logan Chien 9d898f3678 android.hardware.graphics.allocator@2.0 is no longer VNDK-SP
The interface lib has been in VNDK-SP because
android.hardware.graphics.mapper@1.0 was using it. However, since the
dependency has gone [1], there is no need keep it in VNDK-SP. The
VNDK-SP set should be kept as small as possible because libs in VNDK-SP
are subject to double-loading.

[1] 79d13ff0f5

Bug: 69480083
Test: /system/lib64/vndk-sp/android.hardware.graphics.allocator@2.0.so
disappears.
Test: sailfish boots

Change-Id: I0e6518f169dd620d6b1a9ada47754e371ef4a739
2017-12-12 15:57:53 +08:00
Jiyong Park b52ff3e247 Use normalize-path-list
Let's use the existing macro.

Test: build walleye, boots to the UI.
Change-Id: Ic23d3454c629a02bfd96d0ca19c0c5c068ae7a03
2017-12-12 12:13:38 +09:00
Andreas Gampe 9797e0f35e Merge "ASAN: Remove old list of services" am: e78accb103 am: fc7a327a4a
am: 428fb9525e

Change-Id: I044b3ec691e5f711de62590847f672161a0ce3c7
2017-12-12 00:36:26 +00:00
Treehugger Robot e78accb103 Merge "ASAN: Remove old list of services" 2017-12-12 00:15:31 +00:00
Andreas Gampe 27b8fcdfcf ASAN: Remove old list of services
Remove list of services and support for asan.options. This has not
been used in a while, and there is contention about listing names
of device-specific services.

Bug: 70387666
Test: m
Change-Id: I766c6b3a0c44b6b992a3259a3c4215a688452907
2017-12-11 11:36:17 -08:00
Justin Yun 588f5ba383 Merge "Use versioned VNDK directories in ld.config.txt" am: 84de4c0a89 am: 27e44ad179
am: c82c963e28

Change-Id: I4ac01e17f3930635b900128220d923312b2fbb6d
2017-12-11 02:28:30 +00:00
Justin Yun 44bb46f604 Use versioned VNDK directories in ld.config.txt
All vndk/vndk-sp directories will have version suffix if
"ro.vndk.version" is set.

Bug: 69984421
Bug: 66074376
Test: Build with BOARD_VNDK_VERSION=current and
      BOARD_VNDK_RUNTIME_DISABLE=true. Check boot.

Change-Id: I03849f9f96bc6c7880aa70c517e963aab4e033b8
2017-12-11 10:58:51 +09:00
Treehugger Robot fd3225492b Merge "Fix media on W/T" 2017-12-09 00:48:52 +00:00
Elliott Hughes 3e2b34136a Merge "Add OWNERS." am: 3289b9c928 am: 515c8fe572
am: aede8375fe

Change-Id: I28f7a8f3fa9c9837f4043768e70c0d985ed95abd
2017-12-08 01:29:20 +00:00
Elliott Hughes 3d0fc2a60b Merge "Add a /bin symlink for convenience." am: dcc0f8f76b am: 7a54ed9e28
am: 17197ac3e0

Change-Id: I1371ba22037f4466ec2799bb5a8b5056d57a2de2
2017-12-08 00:58:26 +00:00
Treehugger Robot b07cc5e0c0 Merge changes I3978cbe2,I7b8e1232
* changes:
  Reland "Prevent vendors from accessing private VNDK libs"
  Permitted and search path change
2017-12-08 00:50:34 +00:00
Elliott Hughes 3289b9c928 Merge "Add OWNERS." 2017-12-07 23:21:26 +00:00
Elliott Hughes 693d63f9cf Add OWNERS.
Bug: N/A
Test: N/A
Change-Id: Ie785058c0f5eb9b4086c98ccba6e63e3ed411b65
2017-12-07 13:30:03 -08:00
Elliott Hughes dcc0f8f76b Merge "Add a /bin symlink for convenience." 2017-12-07 16:55:25 +00:00
Jiyong Park d083db9bc9 /vendor/priv-app is added to the permitted paths for the default ns
We will have apps under /vendor/priv-app. Add the path to the permitted
paths so that the apks and so libs under the directory can be loaded.

Bug: 35301609
Test: None since we don't have priv vendor app yet.
Change-Id: Ida998adb2e180852b1922e9933f25b988517399e
2017-12-07 18:31:18 +09:00
Marco Nelissen 4ad1a34289 Fix media on W/T
W/T enforce restrictions on linker paths, which M/S do not.
Because of this, media.extractor was unable to load its extractors on W/T.

Bug: 67405932
Test: play sounds successfully
Merged-In: I8914da74780c909da815beaffcd4d76fbe2cc6b5
Change-Id: I8914da74780c909da815beaffcd4d76fbe2cc6b5
(cherry picked from commit 593b43910b)
2017-12-07 18:30:47 +09:00
Jiyong Park ad7ddd5a02 Reland "Prevent vendors from accessing private VNDK libs"
This reverts commit 875fe42a81.

... and fixes a bug that private VNDK libs are not accessible even to
RenderScript framework libraries (such as libRS_internal.so). This is
fixed by exceptionally allowing the private libs only to 'rs'
namespace.

Bug: 70260989
Bug: 70279973
Bug: 63878960
Test: Build for walleye and tested Photos edit.
Test: other renderscript app (camerascript) works as well
Merged-In: I3978cbe2e869f6a1c214c755ded038349bde7b6b
Change-Id: I3978cbe2e869f6a1c214c755ded038349bde7b6b
(cherry picked from commit 781c47f4da)
2017-12-07 13:44:46 +09:00
Sundong Ahn e93d7f9941 Permitted and search path change
The permitted and search paths should be changed according to VNDK version.
However these paths are fixed with vndk and vndk-sp. So I define the
directory name as below
- /system/${LIB}/vndk${VNDK_VERSION}
- /system/${LIB}/vndk-sp${VNDK_VERSION}
${VNDK_VERSION} will be set by the property "ro.vndk.version".

Bug: 66074376
Test: build & run
Merged-In: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
Change-Id: I7b8e12327af89d131c4c49cb9b459a393c7dacb8
(cherry picked from commit 85c773f0a2)
2017-12-07 13:44:29 +09:00
Jiyong Park 74857cccd2 Remove *.dep files for ld.config.txt, [llndk|vndksp].libraries.txt
The dep files are not required because change in the command line
triggers the rule.

Test: m -j ld.config.txt llndk.libraries.txt vndksp.libraries.txt
Re-run the build after adding or removing libs to/from the vndk set.
The txt files are updated accordingly.

Merged-In: I9c9e22088cc2afeb66e8b159f611b25d698cf800
Change-Id: I9c9e22088cc2afeb66e8b159f611b25d698cf800
(cherry picked from commit 81088bf131)
2017-12-07 03:06:52 +00:00
Jiyong Park 781c47f4da Reland "Prevent vendors from accessing private VNDK libs"
This reverts commit 875fe42a81.

... and fixes a bug that private VNDK libs are not accessible even to
RenderScript framework libraries (such as libRS_internal.so). This is
fixed by exceptionally allowing the private libs only to 'rs'
namespace.

Bug: 70260989
Bug: 70279973
Bug: 63878960
Test: Build for walleye and tested Photos edit.
Test: other renderscript app (camerascript) works as well
Change-Id: I3978cbe2e869f6a1c214c755ded038349bde7b6b
2017-12-07 11:59:36 +09:00
Yang Ni 875fe42a81 Revert "Prevent vendors from accessing private VNDK libs"
Bug: 70260989
Bug: 70279973

This reverts commit 6b369bee69.

Test: Build for Walley and tested Photos edit.
2017-12-06 11:59:26 -08:00
Elliott Hughes ff1ef9f2b1 Add a /bin symlink for convenience.
We already have /etc and /sbin. As the Android world moves towards / being
on the system partition, the circumstances under which a /bin symlink
won't work are reduced. This should already be usable most of the time.

Bug: http://b/63142920
Test: `adb shell /bin/date`
Change-Id: I81c2209ae808ced186d05fbe1d5417ce8dd93ea7
2017-12-06 08:59:02 -08:00
Alin Jerpelea 778447ad7d Merge "add odm partition to ld.config.legacy" am: cc06663c04 am: 6ba4207461
am: 61860a37aa

Change-Id: I06c52549ab1b316f6bb1854d9b2a71fbdbbabe36
2017-12-06 04:23:20 +00:00
Alin Jerpelea 6ba4207461 Merge "add odm partition to ld.config.legacy"
am: cc06663c04

Change-Id: I4251acfd4d37b09041aedfdbf926da0d2e64ff67
2017-12-06 04:10:24 +00:00
TreeHugger Robot 0f288d8630 Merge "Prevent vendors from accessing private VNDK libs" 2017-12-05 13:56:09 +00:00
Alin Jerpelea fa7958e1fb add odm partition to ld.config.legacy
change is needed to be able to load libraries from /odm partition

/odm partition should have the lowest priority so that it can not override
the libraries from /vendor or /system partitions

Test: libraries are loaded ok.
Change-Id: Ifdfc22a3406ae3ad1fde53618d4120fd0498f615
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2017-12-01 06:14:11 +09:00
Steven Moreland 8890f7431e Merge "ld.config.txt.in typo: absolution -> absolute" am: 34778d24ae am: 6cf3cd2288
am: be997bf245

Change-Id: If1e3b4f780fcf7a2a35626129b2e7e4841947201
2017-11-29 18:05:16 +00:00
Steven Moreland 6cf3cd2288 Merge "ld.config.txt.in typo: absolution -> absolute"
am: 34778d24ae

Change-Id: Ib541b7b0f3e5162845f49673e65cac5ab1fc909d
2017-11-29 17:57:34 +00:00
Steven Moreland ab338c10e6 ld.config.txt.in typo: absolution -> absolute
Test: none
Change-Id: I247722c0881fa733226eec6578f17b1a481d1e91
2017-11-28 12:42:19 -08:00
Jiyong Park 6b369bee69 Prevent vendors from accessing private VNDK libs
Private VNDK libs are VNDK libs that are only accessible from other VNDK
libs but are inaccessible from vendor libraries. The private VNDK libs
are marked as vendor_available: false.

To enforce this at runtime, the private VNDK libs are excluded from the
list of lib names that links the namespaces.

Also, linker namespaces for vendor processes are modified so that the
VNDK-core and VNDK-SP libs are now loaded in the 'system' namespace and
not in the 'default' namespace.

Bug: 63878960
Test: wahoo devices boot, log does not show any new dlopen error.

Change-Id: Ibfc4f31a97aa6edd7f05cd6177daeb52c165bfeb
2017-11-28 13:13:44 +09:00
Jiyong Park e04e4e7dfe add llndk|vndksp.libraries.txt to vndk_package
List of llndk and vndk-sp libraries are written in the txt file so that
they can be available at run-time. The information is used by
libnativeloader to configure the classloader-namespace specially for
vendor apks.

Bug: 64882323
Test: build 2017 pixel devices. check that the two files exist on
/system/etc.

Merged-In: Ifbe339a5862f6ef57a8213a14a022765ccf77283
Change-Id: Ifbe339a5862f6ef57a8213a14a022765ccf77283
(cherry picked from commit 26335f89b1)
2017-11-28 01:29:30 +00:00
Vishnu Nair 39b9f7cc18 Merge "Create location to store surface and window trace files on init" am: 3dfba33d67 am: 4d736b5fa5
am: e6c35c8608

Change-Id: I02663a6cb3fd019d104807ac375ed7092e3fddab
2017-11-27 21:37:22 +00:00
Vishnu Nair 4d736b5fa5 Merge "Create location to store surface and window trace files on init"
am: 3dfba33d67

Change-Id: Ibcd26a9644e954d4e9fa5be1d538e45c44fcd1b9
2017-11-27 21:26:25 +00:00
Treehugger Robot 3dfba33d67 Merge "Create location to store surface and window trace files on init" 2017-11-27 21:17:07 +00:00
Vishnu Nair d09ab7a217 Create location to store surface and window trace files on init
Bug: 64831661
Test: adb shell su root rm /data/misc/wmtrace && adb reboot && adb shell su ls /data/misc/wmtrace
Change-Id: I60979c26a9226534df534abd3d59df309f6ea6ad
2017-11-27 09:54:31 -08:00
Tom Cherry f8b9d77b81 Merge "Move mkdir /data/nfc/... to rootdir init.rc" am: fa65396ca2 am: 4b3bcf2a10
am: 77ad3f58ae

Change-Id: Ic2ba51690b3dd5b64ea76ec83cb6007b7894810f
2017-11-22 20:13:04 +00:00
Tom Cherry 4b3bcf2a10 Merge "Move mkdir /data/nfc/... to rootdir init.rc"
am: fa65396ca2

Change-Id: I623f24df9b42500f347ae427f4ffd94395abaa56
2017-11-22 20:03:47 +00:00
Tom Cherry fa65396ca2 Merge "Move mkdir /data/nfc/... to rootdir init.rc" 2017-11-22 19:56:10 +00:00
Chen Xu df482d03ad Merge "a new folder to store OTA carrier id update"
am: 76adcdf688

Change-Id: I052a0810830b2a81a8a992d66e8e59cda343b347
2017-11-22 04:35:44 +00:00
fionaxu 06b8e2e130 a new folder to store OTA carrier id update
Bug:64131637
Test: Build
Change-Id: I0ce4322f297bab427d70aed3c329345c899786bb
(cherry picked from commit 45713ff621)
2017-11-21 17:31:00 -08:00
fionaxu 45713ff621 a new folder to store OTA carrier id update
Bug:64131637
Test: Build
Change-Id: I0ce4322f297bab427d70aed3c329345c899786bb
2017-11-21 12:34:39 -08:00
Tom Cherry c319310f9b Move mkdir /data/nfc/... to rootdir init.rc
These are directories used by the system so they should be created by
the system.

Test: treehugger
Change-Id: I2a721ef7871c8842fa912497f5ec6988fcec9e58
2017-11-21 10:40:25 -08:00
Xin Li 23e27db576 Merge commit 'a63ccea6abc7ea02e2d98e41c80793ca97237bd3' from
oc-mr1-dev-plus-aosp into stage-aosp-master

Change-Id: Ia33311cd1fd26dfaea59a69317b306fb91203c40
Merged-In: I03d06b10807e8a313c9654c2e1db36bfb59e3f99
2017-11-14 13:19:45 -08:00
Steven Moreland 2eaa098bfe Merge "PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt" am: c437e14c17 am: 5bd7b32c15
am: 2c531b007e

Change-Id: Iee1ac7081e7954099e9ee77c07480e8db30adb67
2017-11-13 21:19:21 +00:00
Steven Moreland 2c531b007e Merge "PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt" am: c437e14c17
am: 5bd7b32c15

Change-Id: I0958fea7b320025bb329defe2d26a922e7f236bb
2017-11-13 21:13:50 +00:00
Treehugger Robot c437e14c17 Merge "PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt" 2017-11-13 21:06:34 +00:00
Yifan Hong aae9ad533c healthd is class hal
because it serves health 2.0 HAL. This forces it to restart when
hwservicemanager dies.

Bug: 69069765
Test: kill hwservicemanager, lshal shows backup instance

Change-Id: Ib51caa0e718031a0f8797d8af4c2459b4958a62e
2017-11-10 16:42:21 -08:00
Tianjie Xu 41dee1e2be Merge "Create a new directory on boot for update_engine logs" am: 78d882bb5f am: 5d86509d19
am: 2ca0bbfae3

Change-Id: Ibfb3c4054bb0f06446e5c959335ff2abdbe17370
2017-11-10 22:18:15 +00:00
Tianjie Xu 2ca0bbfae3 Merge "Create a new directory on boot for update_engine logs" am: 78d882bb5f
am: 5d86509d19

Change-Id: I01611463c081fafd60fc315a4a91418a4ddef22a
2017-11-10 22:14:35 +00:00
Steven Moreland 4e641e3b6a PRODUCT_TREBLE_LINKER_NAMESPACES for ld.config.txt
PRODUCT_FULL_TREBLE is being deprecated in favor
of smaller flags. Use the appropriate one instead.

Bug: 62019611
Test: manual
Change-Id: Id5d127c29f908cd3011031b3b698ddec3dcba9c1
2017-11-10 10:25:45 -08:00
Tianjie Xu 74fa3cab4e Create a new directory on boot for update_engine logs
Partners require to access update_engine's logs on the file system with
non-root permission.

Bug: 65568605
Test: directory created with the correct permission on boot
Change-Id: I1c1fb4acb8b0f2e7352ffa9e7d05a864940b5986
2017-11-09 12:11:28 -08:00
Jiyong Park a2935e0c8b Tests are run with proper namespace configs by their locations
Tests in /data/[nativetest|benchmarktest] run with namespace config for
system and tests in /data/[nativetest|benchmarktest]/vendor run with
namespace config for vendor.

They no longer run in the 'test' namespace config which didn't impose
any restriction for libraries.

Bug: 67028906
Test: sailfish/marlin builds and boots
Test: no VTS regression on system.img from GSI + vendor.img from
marlin/sailfish
Test: VtsKernelLibcutilsTest successful in above config

Merged-In: I28cdef960d087565c8a22dca0e9a154fb1c3bb94
Change-Id: I28cdef960d087565c8a22dca0e9a154fb1c3bb94
(cherry picked from commit 326b783ad9)
2017-10-30 10:27:45 +09:00
Jiyong Park 6ed1a1c339 Fix: make vndk namespace visible for 2016 Pixes
The nativeloader tries to find the 'vndk' namespace when there is a
vendor apk in the classloader paths. This can happen even for a
downloaded app if the app is using a vendor apk via <uses-library> tag.

In order to prevent the nativeloader from failing to find the vndk
namespace, the namespace is marked as visible.

Bug: 66482442
Test: download the app mentioned in the bug, it does not crash.
Merged-In: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
Change-Id: I82e2394eb6eedcb8645e1a5b3735bbfe2735b312
(cherry picked from commit 1cc09e749f)
2017-10-30 10:27:45 +09:00
Jiyong Park 7f654c3243 vndk: remove vendor/lib from the search path of the 'vndk' namespace
'vndk' namespace is the place for VNDK-SP libs. So /vendor/lib must be
removed from its search paths. It was there just because libhardware
(which is VNDK-SP) is loading HAL libs in vendor partition from there.
However this problem has been solved by modifying the libhardware so
that HAL libs are loaded from the 'sphal' namespace and not from the
current (the 'vndk') namespace.

Bug: 37731053
Test: sailfish builds and boots
Merged-In: Ia88934a975aa8811e05b5ba408e42d132f20f4e9
Change-Id: Ia88934a975aa8811e05b5ba408e42d132f20f4e9
(cherry picked from commit f01b52895d)
2017-10-30 10:27:45 +09:00
Jiyong Park e58fa1b0c6 libz is back to LLNDK
For 2016 pixel devices, where VNDK is not fully enforced, move libz back
to LLNDK so that we can pass the CTS without requiring the default
namespace to be isolated.

If we have libz in vndk-sp directory, test_linker_namespaces fails
because /system/lib/vndk-sp/libz.so becomes accessible. In order to make
the lib inaccessible, we have to make the default namespace isolated,
but this can't be done for 2016 pixel devices where VNDK is not fully
enforced. So, we choose to remove /system/lib/vndk-sp/libz.so and keep
the single copy at /system/lib.

Bug: 65018779
Test: android.jni.cts.JniStaticTest#test_linker_namespaces successful on
2016 pixel devices

Merged-In: Ib6b6560b02be69d2015c0afb86acf07c02b30c2f
Change-Id: Ib6b6560b02be69d2015c0afb86acf07c02b30c2f
(cherry picked from commit 697eb2da0d)
2017-10-30 10:27:45 +09:00
Jiyong Park 7075bca364 Make the rs namespace visible
This allows us to dlopen libRS_internal.so directly from the rs
namespace, not from the sphal namespace.

Bug: 64747884
Test: VtsHalRenderscriptV1_0TargetTest successful on the device built
with BOARD_VNDK_VERSION=current and [system] namespace config is applied
to /data/nativetest[64]/* processes.

Merged-In: I0b441791e395798e80a84592ca01e771bb1c201a
Change-Id: I0b441791e395798e80a84592ca01e771bb1c201a
(cherry picked from commit 421a5e46b7)
2017-10-30 10:27:45 +09:00
Justin Yun 136eb05892 Add libft2.so to ll-ndk for rs namespace
libft2.so is changed to ll-ndk that is available only for rs
namespace.

Bug: 64425518
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I991dc774ca9b92fb6e95a7656243a6a4ecdc0ab9
Change-Id: I991dc774ca9b92fb6e95a7656243a6a4ecdc0ab9
(cherry picked from commit 513f76394a)
2017-10-30 10:27:45 +09:00
Justin Yun 8ebf6ee6f6 Move libz vndk-sp from ll-ndk
The ABI of libz is not as stable as it is for ll-ndk.

Bug: 37617391
Test: build and boot
Merged-In: I883bc6fda268e98cc7cdd5888264170c58688794
Change-Id: I883bc6fda268e98cc7cdd5888264170c58688794
(cherry picked from commit dadd3a846f)
2017-10-30 10:27:45 +09:00
Josh Gao e7be481a7b Merge "Delete obsolete debuggerd references." am: 1193f3bff6 am: 2bf84f9cdd
am: bfdff800a5

Change-Id: I8f98856436285659ba41276242c799453255eed8
2017-10-28 01:23:41 +00:00
Josh Gao bfdff800a5 Merge "Delete obsolete debuggerd references." am: 1193f3bff6
am: 2bf84f9cdd

Change-Id: I08060b18ac0c767bf07ad16a04f9e7ec24993113
2017-10-28 01:19:04 +00:00
Josh Gao 18ea0978cf Delete obsolete debuggerd references.
Test: treehugger
Change-Id: Ic1a8cfb867decd76443fdc26333f2bcaa98b61bb
2017-10-27 16:12:49 -07:00
TreeHugger Robot 49bb5794c8 Merge "Permitted and search path change" 2017-10-26 06:07:06 +00:00
Elliott Hughes 446ab4a378 Merge "Remove Foreground Boost CPUSet" am: 77451492bc am: 17c8a89a08
am: 4921f97fe3

Change-Id: I8f5d7f438c41969a623d0468bb96150824feded7
2017-10-25 20:05:58 +00:00
Elliott Hughes 4921f97fe3 Merge "Remove Foreground Boost CPUSet" am: 77451492bc
am: 17c8a89a08

Change-Id: I08f25d4a799fdb7f3c5b415675dd3c50fa65fe93
2017-10-25 20:02:19 +00:00
Elliott Hughes 77451492bc Merge "Remove Foreground Boost CPUSet" 2017-10-25 19:55:50 +00:00
Jake Weinstein 60bc597183 Remove Foreground Boost CPUSet
This functionality was removed at
https://android.googlesource.com/platform/frameworks/base/+/a712d4058f6f85268838
2017-10-23 20:07:22 -04:00
Jae Shin a909e5e2a1 Merge changes from topic "rs_vndk_step2"
am: 678efa25a6

Change-Id: Idcab36c112406e3dc1fe4eb9cfd5c345cafc0290
2017-10-23 03:03:05 +00:00
Jiyong Park 324f3ed393 templatize ld.config.txt
am: ecc703c792

Change-Id: Ic9dc2f35a4a9a2c2a56cb24a9ac02e9373ed78df
2017-10-23 03:02:31 +00:00
Jiyong Park 6683a8735b Make default namespace for system processes isolated
am: 246338f90e

Change-Id: I2f2d2799ab57031a3c3b24830c0e10376e035acd
2017-10-23 03:01:58 +00:00
Justin Yun e96c957e57 vndk: add vendor/lib(64)/vndk for vendor namespace
am: b5ddc5ae6b

Change-Id: I1e22e9a994932e3e93cbbafb8d5defd5efd69b7c
2017-10-23 03:01:12 +00:00
Justin Yun c82e43034b Implement system namespace for vendor process
am: 333845c710

Change-Id: I0fda3fe689832b0b5cc13a381dacdd633886e27a
2017-10-23 03:00:13 +00:00
Jiyong Park 6d9f5e4012 Use the legacy linker namespace configs when target is sanitized
am: 614c5521a3

Change-Id: I80ff3cb047a9ad351590524a5602cdc0f9df3e61
2017-10-23 02:59:15 +00:00
Jiyong Park b9d74495b1 Permit /system/lib/vndk-sp/hw/ for 'sphal' namespace
am: b5c0fc3ceb

Change-Id: Ic74e02582c7c2f5b7e9900bf77026168a2947fd2
2017-10-23 02:57:57 +00:00
Justin Yun 1cd1a2b812 Add system/${LIB}/vndk to default namespace for vendor.
am: e373672afd

Change-Id: I4f4e47bb297ec604f79007260883112da5de67e1
2017-10-23 02:56:40 +00:00
Jiyong Park 257de3def5 fix: boot fails on ASAN builds with VNDK restriction
Fix the bug that caused boot failure on ASAN builds with VNDK
restriciton. The major cause is because incorrect (old) ld.config.txt
was used when the build is sanitized, which prevented the dynamic linker
to find some VNDK libs that only exist in /system/lib/vndk; the old
ld.config.txt does not have the directory in its search paths. So, this
CL fixes the problem by having the same ld.config.txt for both sanitized
and non-sanitizied builds.

Furthermore, ld.config.txt is modified so that dependency to
libclang_rt* libs are redirected to those in /system/lib directory. This
ensures that the sanitizer runtime libs are not dual loaded but are
provided for both platform and vendors.

Bug: 65217017
Test: SANITIZE_TARGET=integer_overflow SANITIZE_TARGET_DIAG=integer_overflow m
on 2017 pixel devices. The build is successful and the device boots to
the UI.

Merged-In: I0e21e20d9aca340b984968e07d4ce542ae10fd31
Change-Id: I0e21e20d9aca340b984968e07d4ce542ae10fd31
(cherry picked from commit faefa6bd36)
2017-10-23 02:42:47 +00:00
Jiyong Park ecc703c792 templatize ld.config.txt
Lists of libraries in between the linker namespaces are no longer
hard-coded in ld.config.txt, but instead come from Soong.

Bug: 37139976
Test: build 2017 pixel device with BOARD_VNDK_VERSION=current m -j
Test: the device is bootable, basic functionalities (camera, camcorder,
wifi, bt, gps, etc.) work.
Merged-In: I8170e6c3f6ee04b16359791d64cc46bd2714a073
Change-Id: I8170e6c3f6ee04b16359791d64cc46bd2714a073

(cherry picked from commit 367984602a)
2017-10-23 02:40:37 +00:00