Commit graph

34709 commits

Author SHA1 Message Date
Christopher Ferris
8158d708c3 Merge "Fix setting of map_offset in frame data." 2017-10-18 16:01:25 +00:00
Christopher Ferris
c5a3baa5e3 Fix setting of map_offset in frame data.
The old code set the map_offset from elf_offset, but it should have used
offset. Without this change, frame data is not properly shown for shared
libraries in an apk.

Add new unit test to verify that map_offset is set properly.

Test: Ran new unit tests.
Change-Id: I2fe5abda23a5de51c8fcf9361ba9350b80446f15
2017-10-17 18:42:03 -07:00
Treehugger Robot
796987482f Merge "<stdbool.h> not necessary in C++." 2017-10-17 19:26:53 +00:00
Elliott Hughes
a0f73f9bff <stdbool.h> not necessary in C++.
Bug: N/A
Test: builds
Change-Id: I1f32b202e353414e74ace87a7d5b495b5deb5f99
Merged-In: I1f32b202e353414e74ace87a7d5b495b5deb5f99
2017-10-17 16:21:33 +00:00
Tom Cherry
4ff2607ef7 Merge "Only allow UTF8 encoded property values" 2017-10-17 16:12:34 +00:00
Tom Cherry
8702dcb992 Only allow UTF8 encoded property values
Java already restricts properties to only UTF8 valid strings, and
this change makes this restriction also apply to all native code.

Bug: 63177684
Test: new unit tests
Change-Id: I9fa0ecc0da066b0a026db3497c0f0cbf3f5c2d5a
2017-10-16 22:35:33 +00:00
Jae Shin
06254de12a Merge "libkeymaster1 split" 2017-10-16 01:29:29 +00:00
Janis Danisevskis
5c148f3f26 libkeymaster1 split
libkeymaster1 was split into libkeymaster_portable and
libkeymaster_staging.

Bug: 37467707
Test: mma -j
Merged-In: Iead014db3f3d841f08c8072b0493ec9fd7a05055
Merged-In: I63869316451867d54bf34afb28ea232cc7eddbae
Change-Id: Iacdcef8631b4903fef4a79d146a9f59e37f31c3f
2017-10-14 01:18:32 +00:00
Mark Salyzyn
5126ce99de Merge "bootstat: test: duration fixes" 2017-10-13 16:32:10 +00:00
Mark Salyzyn
244947e813 bootstat: test: duration fixes
misspelled duration_test in test_thermal_shutdown

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I5981fa899db84199aefb46c8741511e6889bc79c
2017-10-13 09:29:53 -07:00
Treehugger Robot
af54c27e1b Merge "fs_mgr: removing is_device_secure()" 2017-10-13 03:39:21 +00:00
Bowgo Tsai
744361fc57 fs_mgr: removing is_device_secure()
Previously there is no vboot 1.0 metadata for ENG builds. It relies on
is_device_secure() to query "ro.secure" and skip setting up dm-verity
if the value is 0 (meaning ENG build).

This change will be submitted together with other changes to add vboot
1.0 metadata for ENG builds with a "disable magic". The resulting
metadata will be the same as triggering an "adb disable-verity" on an
USERDEBUG image.

Bug: 63056044
Test: boot sailfish eng/userdebug builds

Change-Id: I35eef771e1b30bfc6d01b8ed76b40c942fe7b783
2017-10-13 06:34:12 +08:00
Tom Cherry
4a5a337ef2 Merge "Move some properties users to __system_property_read_callback()" 2017-10-12 16:53:41 +00:00
Tom Cherry
96e8042e41 Merge "Allow setting read-only properties with value length > 92 characters" 2017-10-12 16:09:43 +00:00
Elliott Hughes
716488f53f Merge "libsparse: fix building on linux host." 2017-10-12 15:18:40 +00:00
Tom Cherry
1cf8d699a4 Allow setting read-only properties with value length > 92 characters
Bug: 23102347
Bug: 34954705
Test: read and write properties with value length > 92 characters
Change-Id: Ie196c1fdacc0489508c633e98fe9f4ad7a27dc6e
2017-10-12 02:52:28 +00:00
Christopher Ferris
63a0008df7 Merge "Add support for boolean literals." 2017-10-12 01:20:07 +00:00
Treehugger Robot
0c24d6ccea Merge "Add missing includes." 2017-10-12 00:06:30 +00:00
Christopher Ferris
0523275893 Add support for boolean literals.
Bug: 67678053

Test: Passes new unit tests.
Change-Id: I9d0ede56aa5d7071e682f366870148320545406e
2017-10-11 15:23:45 -07:00
Treehugger Robot
81dd96c0da Merge "Add missing includes." 2017-10-11 22:17:38 +00:00
Mark Salyzyn
3bc8d4529e Merge "bootstat: test: inject ro.boot.bootreason values" 2017-10-11 20:52:46 +00:00
Mark Salyzyn
9a3870490a bootstat: test: inject ro.boot.bootreason values
Adding a set of automated engineering unit tests with a strict list of
prerequisites.  Not meant for "user" builds.  Must have a crafted
bootloader that does not set the boot reason.  Only works on platforms
where the bootloader either by accident or specifically does not set
the ro.boot.bootreason via kernel command line configuration
androidboot.bootreason=.  If the tests do not have the prerequisites,
the test will report success, but with protest.

These new tests should work on current Hikey and Hikey960 bootloaders
but could very well become obsolete if those platform bootloaders
start setting the boot reason.

We do not want a platform solution as it could allow a third party to
override the bootloader boot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I1793184a8484b83e1d9077475bc65af9816dadf7
2017-10-11 13:48:33 -07:00
Mark Salyzyn
bb52cbf35d Merge "bootstat: test: refine reported test durations" 2017-10-11 20:33:05 +00:00
Mark Salyzyn
444e3a9f74 Merge "bootstat: Add some reserved sys.boot.reason values to enumeration" 2017-10-11 20:32:00 +00:00
Dan Albert
f0d3f6716a Add missing includes.
Test: mma
Bug: None
Merged-In: I8a3390d186aec73f55ae2be2c7b4b2deffed810f
Change-Id: I8a3390d186aec73f55ae2be2c7b4b2deffed810f
2017-10-11 13:31:43 -07:00
Treehugger Robot
d2c66b31a0 Merge "console: Add setenv HOSTNAME console" 2017-10-11 20:22:48 +00:00
Dan Albert
c38057a603 Add missing includes.
Test: mma
Bug: None
Change-Id: I5ee2d09eeac2b4e2056719498916cbdfb79725d2
2017-10-11 13:19:09 -07:00
James Hawkins
b93357bdb2 Merge "bootstat: Special case logging for empty boot reason." 2017-10-11 19:48:49 +00:00
Dmitry Shmidt
d0fb2510e2 console: Add setenv HOSTNAME console
Bug: 67678999
Test: Run serial console on Hikey

Change-Id: Ia5fa9c2af4771508d96545f6a8814a81d5ccee3c
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-10-11 11:20:02 -07:00
Mark Salyzyn
2450cb1a30 bootstat: test: refine reported test durations
Use actual test durations to refine future duration estimates.
Better estimates are cosmetic, but lend confidence to the test
results.

SideEffects: none
Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I49143b78a6dc6fb21838a3d6c70b7eb5a8b4cba5
2017-10-11 10:56:54 -07:00
Mark Salyzyn
243fa29804 bootstat: Add some reserved sys.boot.reason values to enumeration
Add cold,powerkey, warm,s3_wakeup and hard,hw_reset so that
sys.boot.reason values can also be enumerated.  Also add
some reserved speculative entries associated with forced
suspend to RAM and DISK; shutdown,suspend and shutdown,hibernate
respectively.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 67636061
Change-Id: Ic43523748e6006aaca882f8eec7c1f0c08431bd8
2017-10-11 10:56:42 -07:00
Xiaolei Yu
c39caafbbb libsparse: fix building on linux host.
memset is declared in <string.h>

Test: builds and works on host

Change-Id: I224a01c78ee1d0c2f8d5e86eef10c84c8960cbc0
2017-10-11 15:37:52 +08:00
Treehugger Robot
85b80dc18d Merge "fs_mgr: removing __BEGIN_DECLS and __END_DECLS" 2017-10-11 01:43:11 +00:00
James Hawkins
25f7122512 bootstat: Special case logging for empty boot reason.
Empty boot reason is mostly unexpected but may take up the bulk of
unknown reported boot reason values.

Bug: none
Test: none
Change-Id: I9978658c2b052d5cf5d28299861b0d1125ba9fc0
2017-10-10 16:37:05 -07:00
Josh Gao
8eada2a90f Merge "libdebuggerd: fix tombstone tests." 2017-10-10 23:05:12 +00:00
Tom Cherry
31121cafec Move some properties users to __system_property_read_callback()
This is needed if they will ever handle ro. properties that have
values longer than 92 characters.

Bug: 23102347
Bug: 34954705
Test: read and write properties with value length > 92 characters
Change-Id: I44aa135c97ec010f12162c30f743387810ae2c5d
2017-10-10 15:03:33 -07:00
Josh Gao
1ce8e14568 libdebuggerd: fix tombstone tests.
Update the tests to match new output (and stop pluralizing '1 entries').

Test: `debuggerd_test{32,64} --gtest_filter="TombstoneTest.*" on hikey960
Change-Id: I16b0335715303252fad3a35d6a053a50fefdac30
2017-10-10 13:55:44 -07:00
Mark Salyzyn
613a5a97e0 Merge "init+bootstat: reduce last reboot reason to canonical alias" 2017-10-10 19:18:19 +00:00
Mark Salyzyn
6290982ee3 init+bootstat: reduce last reboot reason to canonical alias
To make parsing easier for last reboot reason.  This also ensures that
last boot reason matches the content that is typically returned by the
bootloader or in turn landed in the canonical system boot reason.

Simplify parsing in bootstat.  Adjust and fix boot_reason_test.sh for
new reality.  Allow boot reason tests battery and kernel_panic to pass
if device does not support pstore (empty before and after the test).
If device somehow landed in fastboot mode while waiting for the
display, issue a fastboot reboot to move the test along.  Some cleanup
and standardization changes to the test script.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I97d5467c0b4a6d65df3525f1a2d0051db813d5ad
2017-10-10 09:37:59 -07:00
Bowgo Tsai
d837f837ad fs_mgr: removing __BEGIN_DECLS and __END_DECLS
fs_mgr isn't usable by C now as we've migrated all fs_mgr clients in AOSP
to CPP. Removing the support for C clients.

Bug: 67024518
Bug: 67444051
Test: boot sailfish

Change-Id: Iac57f51eb6a524c6dcdc625c83af75602b4f9b3b
2017-10-10 18:17:29 +08:00
Treehugger Robot
be729702ae Merge "set O_CLOEXEC on /dev/ashmem" 2017-10-09 22:39:47 +00:00
Nick Kralevich
30046acdb2 set O_CLOEXEC on /dev/ashmem
Ensure FDs don't leak across exec() boundaries.

Test: builds and boots. No obvious issues.
Change-Id: I00347b489ddb146b9d33442626f0e89a6cf26551
2017-10-09 13:19:36 -07:00
Jeffrey Vander Stoep
f8bc6cee3f Merge "Allow redeclaring typeattributes" 2017-10-08 04:02:55 +00:00
Jeff Vander Stoep
5e9ba3c50b Allow redeclaring typeattributes
Allows partners to add a new attribute definition to their public
policy without causing a compatibility failure with the AOSP system
image.

Bug: 67092827
Bug: 37915794
Test: build and boot aosp_sailfish with a new type declared in public
    policy.

Change-Id: I3899065affb6806ae9080e1a7dfa5a6f368370f0
2017-10-06 17:04:28 -07:00
James Hawkins
732003429e Merge "libmetricslogger: Fix the out-of-sync proto IDs for boot reason." 2017-10-06 21:33:58 +00:00
James Hawkins
f01dbc30ef libmetricslogger: Fix the out-of-sync proto IDs for boot reason.
Long-term fix is to generate from proto directly. b/65625014

Bug: 67508816
Test: None
Change-Id: Ifa671fa5d3816807836fd18cd66a12a7caebb5a1
2017-10-06 14:30:08 -07:00
Tom Cherry
99016bce92 Merge "init: use ro.init.subcontexts_enabled to enable subcontexts" 2017-10-06 20:12:53 +00:00
Mark Salyzyn
0f058759b0 Merge "bootstat: system_boot_reason does not handle reboot_<reason> case" 2017-10-06 18:07:55 +00:00
Tom Cherry
79193a42e7 init: use ro.init.subcontexts_enabled to enable subcontexts
As SEPolicy is developed, use this property to enable/disable
subcontexts.

Bug: 62875318
Test: boot device with/without subcontexts
Change-Id: Ieb879836a71c72d4de1bb16514d083d52480bf9a
2017-10-06 10:37:09 -07:00
Christopher Ferris
283ca30651 Merge "Use Unwinder object for unwind tool." 2017-10-06 17:08:30 +00:00