Commit Graph

37792 Commits

Author SHA1 Message Date
Elliott Hughes 3e58777255 Merge "Increased number of Android log lines for tombstones" 2017-12-18 18:52:05 +00:00
Steve Paik 2d44190539 Create wrapper function for set_wakeup_callback
Bug: 70669809
Test:  Compiles

Change-Id: I55f8b9995c2d872504b586addb07a18206da7fbe
2017-12-18 10:22:04 -08:00
Julien Desprez 5b585791db Add suite component to test modules
Test: build
Bug: 65303193
Change-Id: I620c7034b9bdfa056dbde97c28bc5abc3375cc42
2017-12-18 18:08:53 +00:00
Treehugger Robot 3459e5823e Merge "Do not use versioned VNDK directory in vendor partition" 2017-12-18 04:58:39 +00:00
chirag honnavar def0888a80 Increased number of Android log lines for tombstones
5 lines are not enough for debug

Bug: b/69815742

Change-Id: I3117f221f4945941ec277064ffd2765dda74e192
2017-12-18 09:28:49 +09:00
Yabin Cui 742fc190c8 Merge "libbacktrace: export offline unwinding failures." 2017-12-16 20:40:25 +00:00
Christopher Ferris e05d6afb90 Merge "Fix issues in libunwindstack." 2017-12-16 02:44:35 +00:00
Josh Gao 152bcf9b80 Merge "crash_dump: fork a copy of the target's address space." 2017-12-16 01:01:13 +00:00
Josh Gao f4a94c44b6 unwindstack: add some perfunctory MemoryOffline tests.
Add some tests for the behavior of MemoryOffline.

Test: libunwindstack_test 32/64 on hikey960
Change-Id: Ib65a0fe5347b86062ffeaf0adaf9af57066edb76
2017-12-15 14:11:12 -08:00
Josh Gao 2b2ae0c88e crash_dump: fork a copy of the target's address space.
Reduce the amount of time that a process remains paused by pausing its
threads, fetching their registers, and then performing unwinding on a
copy of its address space. This also works around a kernel change
that's in 4.9 that prevents ptrace from reading memory of processes
that we don't have immediate permissions to ptrace (even if we
previously ptraced them).

Bug: http://b/62112103
Bug: http://b/63989615
Test: treehugger
Change-Id: I7b9cc5dd8f54a354bc61f1bda0d2b7a8a55733c4
2017-12-15 14:11:12 -08:00
Yabin Cui f88082811a libbacktrace: export offline unwinding failures.
This is to help debugging different offline unwiding failures.

Bug: http://b/69383534
Test: run backtrace_test.
Change-Id: I5ed4837027a9f17d032925e97e9f5927161444b3
2017-12-15 13:29:53 -08:00
Christopher Ferris e7b6624c3f Fix issues in libunwindstack.
- Add a load_bias field in MapInfo so that it can be loaded offline,
  and also so it can be cached.
- Add an Add function to the Maps class so that it's possible to manually
  create a map.
- Remove the OfflineMaps class since I haven't found a reason for this to
  exist.
- Add a pointer to the gnu debugdata compressed section in the interface
  itself and modify the step path to try eh_frame, then debug_frame, then
  gnu_debugdata. This way arm can add exidx as the last step behind
  gnu_debugdata. Add an offline test to verify the order of unwind.
- Fix x86_64_ucontext_t since it was a different size on 32 bit and 64 bit
  systems.

Test: Pass new unit tests.
Change-Id: I978b70d6c244bd307c62a29886d24c1a8cb2af23
2017-12-15 11:17:45 -08:00
Treehugger Robot 3fca67514a Merge "Fix LOG() messages to drop \n" 2017-12-15 16:54:41 +00:00
Treehugger Robot 578a564994 Merge "adb: disable checksum on new versions" 2017-12-15 02:28:59 +00:00
Steve Paik fea16e1dea Fix LOG() messages to drop \n
Bug: 70669809
Test: It's gone
Change-Id: Id66776a229be677c89968d1e0dc81fc8b4b7de5d
2017-12-14 17:31:58 -08:00
Treehugger Robot eef035f641 Merge "Re-format ld.config.*.txt files" 2017-12-15 00:52:48 +00:00
Treehugger Robot 5b6c9f5fb2 Merge "Include what we use." 2017-12-14 23:52:55 +00:00
Elliott Hughes 981379b70f Merge "BENCHMARK_MAIN now requires a semicolon." 2017-12-14 23:24:15 +00:00
Tim Murray de47194940 adb: disable checksum on new versions
The checksum is unnecessary. Improves adb performance by 40% on USB2.

Test: new adb works with new + old adbd, old adb works with new adbd
bug 67327728

Change-Id: I761d8a5a62deaea9bbb092ea9926b2d6d312f00d
2017-12-14 14:18:26 -08:00
Treehugger Robot 385ea22741 Merge "Always check prefix matches array at each node" 2017-12-14 16:47:40 +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
Treehugger Robot edaa28771f Merge "first stage mount: support mount points like /vendor/abc" 2017-12-14 06:45:37 +00:00
Logan Chien 4bba172ed2 Merge "android.hardware.graphics.allocator@2.0 is no longer VNDK-SP" 2017-12-14 03:01:30 +00:00
Elliott Hughes 62322aae85 BENCHMARK_MAIN now requires a semicolon.
Bug: N/A
Test: ran tests
Change-Id: Ie61d8c775cf23877c1aa7025a50b5f8284ae5b08
2017-12-13 18:19:18 -08:00
Tom Cherry 2ae2f606f8 Reland "Have property_service create a serialized property_contexts file"
This reverts commit 9822f3c6cc.

Bug: 36001741
Change-Id: I27dd391fc06a3c78e88a65c7931c84de1699f157
2017-12-14 01:58:17 +00:00
Bowgo Tsai 8028189499 first stage mount: support mount points like /vendor/abc
Current syntax of the fstab in device tree (fstab_dt) assumes the
node name is the mount point, which doesn't allow subdir:

    vendor {   <== using "vendor/abc" leads to syntax error in device tree
        compatible = "android,vendor";
        dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/vendor";
        type = "ext4";
        mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
        fsmgr_flags = "wait";
    };

This CL adds a new field "mnt_point" in the fstab_dt configuration:

    vendor_abc {
        compatible = "android,vendor_abc";
        dev = "/dev/block/platform/soc.0/f9824900.sdhci/by-name/abc";
        type = "ext4";
        mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
        mnt_point = "/vendor/abc";                          <== new field
        fsmgr_flags = "wait";
    };

The new field is optional and will fallback to using node name as mount
point if it is absent.

Note that this CL also sorts fstab_dt by mount point, because
/vendor needs to be mounted first, which contains a directory
/vendor/abc, before /vendor/abc can be mounted.

Bug: 69955336
Test: first stage mount /vendor/abc on a device
Change-Id: Ie2e519f9801f211a7a221622f32c82bedd00353f
2017-12-14 09:48:26 +08:00
Tom Cherry 26eba2879d Always check prefix matches array at each node
Currently, we only check if the name of a given node in the trie is a
prefix match and the prefix matches array of the final node.  This is
incorrect however, as the prefix matches array of intermediate nodes
may contain the prefix for a given property.  This change adds that
check and test cases for this case.

Bug: 36001741
Test: new unit tests
Change-Id: I9f58ebc559f2ac591aa44df9e71205704bf18f66
2017-12-13 16:58:33 -08:00
Tom Cherry 212257dbb9 Merge "Revert "Have property_service create a serialized property_contexts file"" 2017-12-13 22:48:59 +00:00
Robert Greenwalt 9822f3c6cc Revert "Have property_service create a serialized property_contexts file"
This reverts commit e8181c0f55.

Reason for revert: This is broken.

Bug: 36001741

Change-Id: I458abc23275ecdfadcabacd611b288449196efa0
2017-12-13 14:42:26 -08:00
Dan Albert 629c292dbb Include what we use.
Test: mma
Bug: None
Change-Id: Id8742db719906847bf40506ae8a79cea8bc092dc
Exempt-From-Owner-Approval: trivial cleanup
2017-12-13 13:41:14 -08:00
Treehugger Robot 69ee1c9418 Merge "Add an extra set of test cases for libpropertyinfoparser" 2017-12-13 16:55:24 +00: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
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
Treehugger Robot a6e6780418 Merge "Add VNDK version for namespace configuration files" 2017-12-13 01:49:41 +00:00
Tom Cherry 8cc596208c Add an extra set of test cases for libpropertyinfoparser
Test to ensure that exact matches and prefix matches at the root level
work.

Test: these test cases
Change-Id: Idb296329c4c4f1bb1ba336b5cb12d5761239fbf8
2017-12-12 17:33:55 -08: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
Tom Cherry c47dd6b5c0 Merge changes from topic "property-trie"
* changes:
  Have property_service create a serialized property_contexts file
  Parse property contexts via a serialized trie
2017-12-13 01:28:36 +00:00
Treehugger Robot 43e063f027 Merge "Load versioned llndk.libraries.txt and vndksp.libraries.txt" 2017-12-13 01:28:31 +00:00
Justin Yun 4a1d11038f Load versioned llndk.libraries.txt and vndksp.libraries.txt
When ro.vndk.version has a specific VNDK version in it, use the
llndk.libraries.txt and vndksp.libraries.txt files with the version
suffix in the file names.
If ro.vndk.version is "current" or not set, the version suffix will
not be added.
This is to use a proper VNDK snapshot version configuration for a
vendor patition.

Bug: 69531793
Test: In system/etc directory of a Pixel2 device,
  Change llndk.libraries.txt to llndk.libraries.27.txt
  Change vndksp.libraries.txt to vndksp.libraries.27.txt
  Set ro.vndk.version to 27 in vendor/default.prop
  reboot and check if vendor apks work.

Change-Id: I82d83b6805799ea71cc88d1e0297d265a40c0061
2017-12-13 10:27:28 +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
Treehugger Robot c034cd5d04 Merge "Use normalize-path-list" 2017-12-12 08:03:53 +00: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
Elliott Hughes bf2062f800 Merge "Set $TMPDIR for `adb shell`." 2017-12-12 00:29:50 +00:00
Treehugger Robot e78accb103 Merge "ASAN: Remove old list of services" 2017-12-12 00:15:31 +00:00
Tom Cherry e8181c0f55 Have property_service create a serialized property_contexts file
Instead of requiring each process to parse the property contexts files
in libc initialization, this change has property_service parse these
files one into a serialized trie, which the property code in libc can
then directly interpret for mapping property names to their associated
SELinux context.

Bug: 36001741
Test: boot bullhead, walleye, run unit tests

Change-Id: If67073d56e800b3ca667fb5322e6b993e7d810f6
2017-12-11 16:12:13 -08:00
Tom Cherry d853f77ed3 Parse property contexts via a serialized trie
Currently, whenever a new program starts, libc initializes two data
structures related to properties from the raw property_context files.
There are two problems here,
1) This takes roughly 1.2ms on a trivial program to generate contents
   that could otherwise be cached.
2) One of the data structures is a descending list of prefixes, each
   of which needs to be checked, whereas a trie would be more
   efficient.

This change introduces two libraries,
1) libpropertycontextserializer meant to be used by property_service
   to create a serialized trie containing all of the property
   contexts.
2) libpropertycontextparser meant to be used by libc's property
   functions to parse this serialized trie during property lookup.

This new trie also contains the ability to have exact matches instead
of prefix matches for properties, which was not possible before.

Bug: 36001741
Change-Id: I42324f04c4d995a0e055e9685d79f40393dfca51
2017-12-11 16:11:42 -08:00
Christopher Ferris 515bff81fe Merge "Add libunwindstack support for Mips and Mips64" 2017-12-11 21:06:26 +00:00
Yabin Cui 80bfeeef88 Merge "libBacktraceOffline: try both .debug_frame and .ARM.exidx on arm." 2017-12-11 20:37:26 +00:00