Commit graph

44388 commits

Author SHA1 Message Date
Treehugger Robot
81767b1d3d Merge "procinfo: Read inode number from /proc/<pid>/maps" 2019-02-15 23:03:00 +00:00
Mark Salyzyn
e7d638a02b Merge "fs_mgr: harden adb-remount-test.sh" 2019-02-15 22:51:01 +00:00
Mark Salyzyn
bbe33f7826 fs_mgr: harden adb-remount-test.sh
Harden adb-remount-test.sh script.  Add --no-color and --color
options.  Allows --serial to be passed in.  Add a recovery handler
that restores the device to verity enabled if possible.  List the
partitions sizes as they may be relevant to triaging errors.  Allow
for devices that have a mixed set of remounts, some direct, some
with overlayfs.  Allow two scripts to run at the same time on a host
machine targetting different devices.  Detect if wrong adb is used
for adb reboot-fastboot.

Add a build target for adb-remount-test.sh so that the script
is landed into the host tools bin for easy pickup.

Test: adb-remount-test.sh
Bug: 123079041
Change-Id: I6369a245a656419067ec4350a4dbdf78c9b0533e
2019-02-15 14:28:19 -08:00
Andreas Gampe
cd67fa9c1a Merge "Ziparchive: Give tests a test config" 2019-02-15 20:15:37 +00:00
Pirama Arumuga Nainar
e479b47e0e Merge "Mark gglMulx and gglMulAddx as always_inline" 2019-02-15 20:03:25 +00:00
Andreas Gampe
881e2e198b Ziparchive: Give tests a test config
To work around problems with the autogenerated one.

Bug: 117891984
Bug: 124515549
Test: atest ziparchive-tests
Change-Id: Ia4b352b7404255a4fe9e644a56ae9c5d41c79886
2019-02-15 11:53:49 -08:00
Maciej Żenczykowski
af0c58f12d Merge "Refactor OWNERS files for Android Core Networking" 2019-02-15 00:14:43 +00:00
David Anderson
cb13a7766e Merge "Enable metadata encryption for userdata_gsi." 2019-02-14 20:27:05 +00:00
Pirama Arumuga Nainar
5d88cef82b Mark gglMulx and gglMulAddx as always_inline
Bug: http://b/116873221
Bug: http://b/124451159

This is to get them building with O0 (needed for coverage builds).  At
O0, without the always_inline, the compiler is not able to reconcile the
constraints in the inline assembly.

In file included from system/core/libpixelflinger/trap.cpp:27:
In file included from system/core/libpixelflinger/trap.h:22:
In file included from
system/core/libpixelflinger/include/private/pixelflinger/ggl_context.h:27:
system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:113:9:
error: invalid operand for inline asm constraint 'I'
  asm("smull  %[lo], %[hi], %[x], %[y]            \n"
      ^
system/core/libpixelflinger/include/private/pixelflinger/ggl_fixed.h:136:9:
error: invalid operand for inline asm constraint 'I'
  asm("smull  %[lo], %[hi], %[x], %[y]            \n"
      ^
2 errors generated.

Test: m NATIVE_COVERAGE=true COVERAGE_PATHS=system/core/libpixelflinger
Test: m
Change-Id: Ia4516b19b957687b5fa25d2d100679abcec29366
2019-02-14 11:59:48 -08:00
Mark Salyzyn
fa130f3ad4 Merge "fs_mgr: overlayfs: export fs_mgr_overlayfs_candidate_list" 2019-02-14 19:20:45 +00:00
Suren Baghdasaryan
da20bc763e Merge "Fix cgroup support for recovery mode" 2019-02-14 18:08:40 +00:00
Vic Yang
4f5625d9c7 Merge "libvndksupport: Add android_is_in_vendor_process()" 2019-02-14 18:03:19 +00:00
Treehugger Robot
941cb7606c Merge "Skip enabling dm-verity for live GSI when needed" 2019-02-14 17:55:56 +00:00
Suren Baghdasaryan
d032a92c04 Fix cgroup support for recovery mode
In recovery mode a separate set of cgroups should be mounted. Add a
cgroups.recovery.json file to describe cgroups mounted during recovery.
Change cgroups descriptor parset to allow cgroups and cgroups2 sections
to be omitted.

Bug: 124270406
Test: "adb reboot sideload; adb devices" shows 'sideload' as expected

Change-Id: Ic32bd2b4612ec8390064f87d4655d1bd1183d741
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 17:08:40 +00:00
Treehugger Robot
612a6d6ba3 Merge "Use new static target for libdexfile_support." 2019-02-14 14:36:32 +00:00
junyulai
54302442e2 Refactor OWNERS files for Android Core Networking
Bug: 120829091
Test: build/make/tools/checkowners.py -c -v path/OWNERS
Change-Id: I0b9dd6a6c01e46d887d1161179ca3791f461dce6
2019-02-14 14:13:53 +08:00
Suren Baghdasaryan
f5b7361cf4 Merge "Suppress error log when timerslack_ns write fails for already dead process" 2019-02-14 05:44:34 +00:00
Suren Baghdasaryan
2bc522878d Suppress error log when timerslack_ns write fails for already dead process
lmkd uses set_sched_priority to expedite killing of its victims and this
sometimes results in timerslack_ns writes for an process which is already
dead. These messages are detrimental during troubleshooting and do not
indicate a real problem, therefore need to be suppressed.

Bug: 124324891
Test: lmkd_unit_test

Change-Id: I5bc071b47d386c279dd9a56eee51dba7797f4520
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
2019-02-14 03:51:17 +00:00
Treehugger Robot
4ecbe76354 Merge "Mark libs as double_loadable" 2019-02-14 02:10:05 +00:00
Treehugger Robot
6332b7a368 Merge "Update OWNERS for libnativebridge" 2019-02-14 01:42:28 +00:00
Treehugger Robot
ebadad5c56 Merge "Add TEST_MAPPING for system/core/rootdir/etc" 2019-02-14 00:11:36 +00:00
Treehugger Robot
48c6d139b3 Merge "Add compat symlinks into the Runtime APEX for the ART binaries." 2019-02-13 23:08:01 +00:00
Treehugger Robot
ac4c2d8947 Merge "libmeminfo: change dmabuf_dump from soc_specific to product_specific" 2019-02-13 22:39:49 +00:00
Mark Salyzyn
dffdb4374b fs_mgr: overlayfs: export fs_mgr_overlayfs_candidate_list
Refactor fs_mgr_candidate_list into fs_mgr_overlayfs_candidate_list
that reports all the possible candidates.  The caller is responsible
for filtering out any that have verity enabled.

Sundry improvements to the adb-remount-test.sh script to improve
stability and feedback.

Test: adb-remount-test.sh
Bug: 122602260
Change-Id: I2399f83d8ed77d8f3d2ad1405d0c187ccbace764
2019-02-13 10:49:18 -08:00
Tom Cherry
111e38e5bc Merge "liblog: simplify socket_local_client() and always use CLOEXEC" 2019-02-13 16:34:55 +00:00
Martin Stjernholm
7f77dbfe64 Add compat symlinks into the Runtime APEX for the ART binaries.
This is a precaution in case there are dependencies on the binaries in the
old location. b/124106384 tracks eliminating them (if any).

Test: Flash and check symlinks are there with adb shell ls -l system/bin
Test: adb shell system/bin/<binary>
Bug: 113373927
Bug: 124106384
Change-Id: Ib4102fe55117611f68184102e68a10ea47de0065
2019-02-13 15:10:11 +00:00
Bowgo Tsai
fffe43974d Skip enabling dm-verity for live GSI when needed
Currently the dm-verity for live GSI is always enabled, even if the
disable bit in the top-level /vbmeta is set. We should skip setting up
dm-verity on live system.img when adb disable-verity is ever set.

Bug: 124291583
Test: adb disable-verity, then boot live GSI
Test: fastboot flash --disable-verification vbmeta vbmeta.img,
      then boot live GSI

Change-Id: Id52d20d0b2e56dfa7de8f866dcc989b82a96c879
2019-02-13 22:12:09 +08:00
Martin Stjernholm
18de135031 Merge "Introduce a separate linker config section for native tests." 2019-02-13 10:32:29 +00:00
Jiyong Park
22855f7365 Update OWNERS for libnativebridge
Add ART peoples as owners of libnativebridge

Test: N/A
Change-Id: I45b81fb6bb4771828581972d11f0f5eda590c99a
2019-02-13 19:20:59 +09:00
Jiyong Park
8011f03eb2 Add TEST_MAPPING for system/core/rootdir/etc
bionic-unit-tests runs when one of the linker config files is changed.

Test: N/A
Change-Id: I8af1a9728dab4492fe34a3b4daab9c5f9973d84f
2019-02-13 16:40:47 +09:00
Pirama Arumuga Nainar
68c5ce22fb Merge "Make inlines static" 2019-02-13 06:30:11 +00:00
Vic Yang
a117f25b4e libvndksupport: Add android_is_in_vendor_process()
In preparation for cleaning up conditionally compiled VNDK libraries,
we need a function that determines if the current process is running in
the system process or the vendor process.

Bug: 119423884
Test: Add a dummy VNDK library that prints different string in system
      vs vendor process.  Use the library in different processs and
      check the output.

Change-Id: Ic00927d8eadd2a21fcba9cb64cc93eaadd5bdd2d
2019-02-12 20:28:38 -08:00
Treehugger Robot
c7b5c4fa6b Merge "libfs_avb: adding two public APIs" 2019-02-13 03:07:37 +00:00
Logan Chien
8540f50887 Merge "Fix APEX run-time ld.config.txt for ASAN targets" 2019-02-13 02:24:08 +00:00
Treehugger Robot
4b6b7b6715 Merge "shim libraries for libnativeloader and libnativebridge" 2019-02-13 02:17:35 +00:00
Treehugger Robot
47e8300412 Merge "Change search order for vendor processes in vndk_lite." 2019-02-13 01:57:08 +00:00
Justin Yun
023ff46e18 Change search order for vendor processes in vndk_lite.
Originally, vndk_lite does not include system/lib/vndk-* directory but
searching the required files in system/lib instead. However, in GSI,
they are using the vndk libs which has symbols than core variants.
To avoid this problem, allow the vendor processes in vndk_lite devices
to search system/lib prior to vndk libs.

Bug: 124063441
Test: Check boot for vndk_lite devices.
Change-Id: I89a72e9d43d6fb05f4b6d87bbd4500f8febfe970
2019-02-13 01:56:28 +00:00
Dongwon Kang
0b4f2532a7 Merge "Exclude libvndksupport from APEXes." 2019-02-13 00:40:53 +00:00
Martin Stjernholm
e31cfb609d Use new static target for libdexfile_support.
This is necessary since the dynamic one is now using dlopen(), which isn't
available in static builds.

Test: m
Test: mmma system/core/{libunwindstack,libbacktrace}, run host gtests (cannot get atest to work)
Bug: 123403798
Bug: 123186083
Change-Id: I06a9cdfe7e7cc01427ffd54b66c8ebab88782260
2019-02-12 22:03:48 +00:00
Tom Cherry
05de1ba38e liblog: simplify socket_local_client() and always use CLOEXEC
socket_local_client() was copied from libcutils, but we only need a
small subset of its functionality.  We instead create our own version
with just the needed parts.

Importantly, use CLOEXEC in this new function and other places where
it was missing previously.

Test: logging works, liblog-unit-tests
Change-Id: Ifb929227af67bafa13e391eab92358d9f6fe6450
2019-02-12 12:53:19 -08:00
Martin Stjernholm
bcb5ba75a5 Introduce a separate linker config section for native tests.
There are tests that require access to both system and vendor libraries,
like what the linker sets up when there is no matching config section.

Test: atest cameraservice_test libsurfaceflinger_unittest perfprofd_test \
  inputflinger_tests (no new failures, but 3 old ones)
Test: Internal test can load libandroid.so
Bug: 124127405
Bug: 123700170

Change-Id: I4f5cb2e09bdf1ae510259198c08c252b41249d94
2019-02-12 18:45:37 +00:00
Tom Cherry
5272f9b017 Merge "Refactor fs_mgr_update_verity_state()" 2019-02-12 17:22:09 +00:00
Steven Laver
944e6f1d17 Merge "Allow properties to be derived from partition-specific properties during init" 2019-02-12 16:44:57 +00:00
Junyu Lai
1d7966bd46 Merge "Refactor OWNERS files for Android Core Networking" 2019-02-12 16:20:27 +00:00
Bowgo Tsai
cd316ea4a0 libfs_avb: adding two public APIs
The client can include <fs_avb/fs_avb_util.h> to use the two new
functions to load vbmeta for a FstabEntry and extract the hash tree
descriptor from the loaded vbmeta, respectively.

// Given a FstabEntry, loads and verifies the vbmeta.
std::unique_ptr<VBMetaData> LoadAndVerifyVbmeta(...);

// Gets the hashtree descriptor with avb_partition_name from the vbmeta.
std::unique_ptr<FsAvbHashtreeDescriptor> GetHashtreeDescriptor(...);

Bug: 65470881
Test: atest libfs_avb_test
Test: atest libfs_avb_internal_test
Test: atest libfs_avb_device_test
Change-Id: I7d6619eb8140c14734ffb8f8a1b22cddd2f562f0
2019-02-12 22:03:20 +08:00
Logan Chien
f7b46a2eb1 Fix APEX run-time ld.config.txt for ASAN targets
This commit fixes the search paths for vendor binaries in ASAN targets.

Test: Boot aosp_walleye-userdebug to home screen
Change-Id: Id87ceee3c43098bd453f6fae4f32ea62355f922b
2019-02-12 20:02:05 +08:00
Jiyong Park
00f2ebe9cc shim libraries for libnativeloader and libnativebridge
libnativeloader_lazy and libnativebridge_lazy are shim libraries for
libnativeloader and libnativebridge, respectively.

The shim libraries provides the same APIs as their counterparts, but
when the APIs are called, the APIs from the real libraries are
loaded/linked/and executed using dlopen/dlsym.

Bug: 123403798
Bug: 124250621
Test: m
Test: device boots to the UI
Test: mma under system/core/libnativebridge with aosp_cf_x86
adb sync; execute all tests under
/data/nativetest/libnativebridge-lazy-tests
All passes except NativeBridgeTest.V2_Signal which is also failing
in /data/nativetest/libnativebridge-tests.

Change-Id: Ic6484784eaa7872dcdd2decbb30943fb34c1abd7
2019-02-12 19:35:45 +09:00
junyulai
1e9c3a50fb Refactor OWNERS files for Android Core Networking
Bug: 120829091
Test: build/make/tools/checkowners.py -c -v path/OWNERS
Change-Id: Ia172b5e907a28441d288b84cd74ceea24c58cbcf
2019-02-12 13:25:13 +08:00
Erick Reyes
9bb8e0d704 libmeminfo: change dmabuf_dump from soc_specific to product_specific
The vendor partition does not give dmabuf_dump enough permissions to
retrieve shared buffer information for all processes. Move it to product
partition where it can be invoked from platform's dumpstate.

Bug: 63860998

Change-Id: I73957f59943d1e49fcb59abb723aad4eeeaa4172
Signed-off-by: Erick Reyes <erickreyes@google.com>
2019-02-11 19:16:58 -08:00
Treehugger Robot
34f3660e2c Merge "apexd is started much earlier to create loopback devices" 2019-02-12 01:55:03 +00:00