Commit Graph

38934 Commits

Author SHA1 Message Date
Treehugger Robot 5dfe1e81d4 Merge "libbase: fix libbase_test.logging.StdioLogger." 2018-06-06 21:41:17 +00:00
Elliott Hughes 11a64eb0e8 libbase: fix libbase_test.logging.StdioLogger.
I don't think the StdioLogger test ever passed. Move GetFileBasename
to where we can use it from StdioLogger, and undo the mix of anonymous
namespace vs static to consistently use static (which is the majority)
while we're touching those lines.

Bug: N/A
Test: ran tests
Change-Id: I95b3966cdb8af642bed71752bd7d4e3a86ac84ca
2018-06-06 12:54:41 -07:00
Elliott Hughes 063183f203 Merge "Try to fix LocalUnwinderTest.unwind_after_dlopen in APCT." 2018-06-06 19:47:02 +00:00
Elliott Hughes f6d7594d7f Try to fix LocalUnwinderTest.unwind_after_dlopen in APCT.
Failure:

  system/core/libunwindstack/tests/LocalUnwinderTest.cpp:181: Failure
  Value of: handle != nullptr
  Actual: false
  Expected: true

Bug: N/A
Test: N/A
Change-Id: I89b3228d51961f7bf952dd01f12f4ee61a97fe91
2018-06-06 10:48:41 -07:00
Lorenzo Colitti 2a7c887198 Merge "Move per-file OWNERS directives to their directories." 2018-06-06 07:48:55 +00:00
Treehugger Robot 5c1d56dffa Merge "Revert "SocketListener: use poll() instead of select()"" 2018-06-06 04:56:25 +00:00
Lorenzo Colitti 58f2daaeb4 Move per-file OWNERS directives to their directories.
As documented at go/gerrit-owners, per-file directives cannot
contain directory paths. Therefore the current per-file
directives in system/core/OWNERS have no effect.

Test: build/make/tools/checkowners.py system/core/{,libsysutils/src/,include/sysutils/}OWNERS
Change-Id: Ia88b2be42dd50346578bb51dd17fb6136a4591f1
2018-06-06 11:49:40 +09:00
Kevin Rocard 775ad25510 Revert "SocketListener: use poll() instead of select()"
This reverts commit 0ad41cf3f4.

Reason for revert: Breaks many tests, see b/109745952#comment18 b/109745952#comment20 and b/79838856#comment19 amongst others

Change-Id: I92db38d47cd1dcd7841091e37e3b65dce9456cdf
2018-06-06 02:17:24 +00:00
Treehugger Robot 666f62e1c7 Merge "libsync: OWNERS." 2018-06-05 19:38:25 +00:00
Kevin Rocard c2a89f396b Merge "Revert "sync: remove legacy sync info API"" 2018-06-05 17:58:32 +00:00
Elliott Hughes f2570c2f92 libsync: OWNERS.
Based on git shortlog and my memory.

Bug: N/A
Test: N/A
Change-Id: I2e821a1214c349fd75f2971f632de3d30c602b83
2018-06-05 10:56:38 -07:00
Treehugger Robot a1ae903d00 Merge "Populate recovery DTBO offset correctly" 2018-06-05 17:49:27 +00:00
Marissa Wall eed25df46a Revert "sync: remove legacy sync info API"
This reverts commit 798ba95bda.

Brodcom uses the sync_fence_info_data directly.
https://android-build.googleplex.com/builds/submitted/4821789/elfin-userdebug/latest/view/logs/build_error.log

Change-Id: I72fed683397e9b10007b71253e20ded43726d377
2018-06-05 17:22:32 +00:00
Treehugger Robot 1f87959cf7 Merge "liblog: expect content only if ro.logd.kernel is enabled" 2018-06-05 16:45:44 +00:00
Mark Salyzyn 42fb2821cc liblog: expect content only if ro.logd.kernel is enabled
On svelte devices, CTS test liblog#android_logger_get_ fails on the
missing kernel buffer because it is not enabled to save space.

Test: gTest liblog_unit_tests
Bug: 109669791
Change-Id: Iaf46fe9713d3462a56885515a67db640544345ab
2018-06-05 07:43:15 -07:00
Treehugger Robot 2be430aceb Merge "Fix performance degradation from BootSequence atom" 2018-06-05 14:41:26 +00:00
Jesse Hall d356071fed Merge changes from topic "sync-cleanup"
* changes:
  sync: remove legacy sync info API
  Remove obsolete sync_test.c
2018-06-05 05:15:05 +00:00
Hridya Valsaraju 26e01bbdc5 Populate recovery DTBO offset correctly
Also, remove recovery_dtbo_offset argument
for mkbootimg as this is calculated based
on sizes of kernel, ramdisk and second
binaries.

Also, modify unpack_bootimg to use the recovery_dtbo_offset
field to extract recovery_dtbo.

Test: make recoveryimage showcommands -j32
unpack_bootimg --boot_img $OUT/recovery.img
diff recovery_dtbo dtbo.img

Change-Id: I588ccc8b739c169b6f78c17ffe554c5562397d98
2018-06-04 15:26:42 -07:00
Tej Singh 993f65619e Fix performance degradation from BootSequence atom
(partial cherry pick from commit fe3e762b6d)

Adding the boot sequence reported atom in ag/3518079 caused the duration
of bootstat to increase, as seen in b/72864061. I isolated the cause
down to calling BootReasonStrToReason. However, this function also gets
called in ReportBootReason, so I created another function that does the
parsing and sets the system boot reason property, and made
RecordBootReason and statsd logging get that property.

Bug: 72864061
Test: rebooted phone, verified boot events were received in adb shell
logcat -b stats and verified adb shell bootstat -p printed correct
values. Ran timing tests as well on walleye with 20 boots: before this
change, the average was ~150-160ms. After, it was ~80ms.
Change-Id: I92dbc9880328835647be7d9d50c7861b42f27bdb
Merged-In: I92dbc9880328835647be7d9d50c7861b42f27bdb
2018-06-04 13:31:05 -07:00
Mark Salyzyn dc17e9efa0 Merge changes Iecedc3b1,I28987f08
* changes:
  bootstat: refine boot reasons
  bootstat: shutdown reports reboot
2018-06-04 20:29:58 +00:00
Mark Salyzyn 186f67625c bootstat: refine boot reasons
Received some clarity as to some of the boot reasons.

List of boot reasons and new translations to Canonical boot reason:

- "power_key" -> "cold,powerkey" (existing)
- "usb" -> "cold,charger" (existing)
- "rtc" -> "cold,rtc" (existing)
- "wdt" -> "reboot" (changed)
- "wdt_by_pass_pwk" -> "warm" (changed)
- "tool_by_pass_pwd" -> "reboot,tool" (changed)
- "2sec_reboot" -> "cold,rtc,2sec" (changed)
- "unknown" -> "reboot,unknown" (existing)
- "kernel_panic" (existing)
- "reboot" (existing)
- "watchdog" (existing)

Add the new string to enums for the new Boot Reason.

Test: boot_reason_test.sh (on affected device)
Bug: 74595769
Bug: 63736262
Change-Id: Iecedc3b1f7c47f26d0c77b1f316f745c6d2c1256
2018-06-04 08:32:23 -07:00
Mark Salyzyn 1519925149 bootstat: shutdown reports reboot
Some devices report the following canonical boot reason for all
shutdown operations:

    reboot,kernel_power_off_charging__reboot_system

because shutdown switches to a charging kernel, and reboots into the
system when the user presses the power button.  Thus last kernel
messages arrives as:

    <0>.(0)[53:pmic_thread]reboot: Restarting system with command \
                       'kernel power off charging  reboot system'
     -> "shutdown" (w/o last boot reason)
     -> "shutdown,<subreason>" (w/last boot reason)

The reboot reason from that charging instance propagates as a
fortified boot reason blocking interpretation of the last boot reason
that manages shutdown canonical boot reason determination.  The fix
is to change reboot,kernel_power_off_charging__reboot_system to
shutdown, so that it is viewed as a blunt reason that can be
overridden by last boot reason.

We added the above boot reason to kBootReasonMap because the Bit
Error Handler can use it to reconstruct if there is any damage to
the last kernel messages content.  The sad thing is that the enum
will never propagate as we are filtering it out and reporting
"shutdown" instead.  Of course, we are now covered for a can not
happen.

Test: boot_reason_test.sh
Bug: 74595769
Bug: 63736262
Change-Id: I28987f0871af7d967cc4bbbffed43bd42349acdd
2018-06-04 08:32:11 -07:00
Treehugger Robot 7c4d393c24 Merge "bootstat: Add kernel_panic,modem + related others" 2018-06-04 15:27:40 +00:00
Treehugger Robot 51f0f7e791 Merge "SocketListener: use poll() instead of select()" 2018-06-03 10:02:35 +00:00
Mark Salyzyn 8ad6e67332 bootstat: Add kernel_panic,modem + related others
Found a kernel modem driver report:

Kernel panic - not syncing: subsys-restart: Resetting the SoC - modem crashed.

Which translates to the canonical boot reason, a wordy:
    kernel_panic,subsys-restart:_resetting_the_soc_-_modem_crashed.

Shortening and ber matching the string, plus others that are possible,
to be more succinct, so added kernel_panic,{modem|adsp|dsps|wcnss}.

Test: build
Bug: 80553005
Change-Id: I969e1da896cd15b82e2fe11ceb77a5f54dfcfbc8
2018-06-01 09:27:48 -07:00
Treehugger Robot f875aaa339 Merge "libnativeloader: add jiyong to OWNERS." 2018-06-01 02:59:57 +00:00
Treehugger Robot 36b61f061d Merge "Support /product/bin" 2018-06-01 01:22:58 +00:00
Elliott Hughes 0ca7c79dfb libnativeloader: add jiyong to OWNERS.
Bug: N/A
Test: N/A
Change-Id: I892bfff4bcf28482588582a1045dcae720b121db
2018-05-31 18:09:20 -07:00
Elliott Hughes cf252ab07d Merge "Improve SIGILL support." 2018-06-01 00:51:14 +00:00
Treehugger Robot bfb4bf05d9 Merge "adb: add remount -R for deduplicated ext4" 2018-06-01 00:28:52 +00:00
Inseob Kim 25195daaca Support /product/bin
Bug: 80422611
Test: m -j succeeded and permissions of files under /product/bin are set
correctly

Change-Id: I83377d809c47c92da6b226d2853ea6a7462fb127
2018-06-01 08:33:04 +09:00
David Anderson 07445f4a71 adb: add remount -R for deduplicated ext4
When using "adb remount" on a deduplicated filesystem, the current
response is a warning that the remount will not work. This patch
allows the user to specify an -R option. This option will reboot to recovery,
run e2fsck to undo deduplication, and then reboot the device where "adb
remount" will then succeed.

In addition, if verity needs to be disabled to remount, it will be disabled in
the same reboot cycle to minimize reboots.

Bug: 64109868
Test: adb remount -R on a deduplicated filesystem
Change-Id: I812407499b2df6f4d2509e8d51878117108a6849
2018-05-31 15:38:25 -07:00
Yifan Hong 05625ab420 Merge "androidboot.lrap => logical_partitions" 2018-05-31 22:05:06 +00:00
Yifan Hong 59bd65bdf6 androidboot.lrap => logical_partitions
Test: boots with prototype
Bug: 79885414
Change-Id: Ia84d052800b71ff9cfa1630def0ce72c57f76b81
2018-05-31 13:08:01 -07:00
Tom Cherry 1c15b02b54 Merge "init: implement getpwnam for host init verifier" 2018-05-31 17:30:50 +00:00
Tom Cherry 279de56b3e Merge "init: handle properties and imports for host init verifier" 2018-05-31 15:48:31 +00:00
Tom Cherry 31525f5cb6 init: implement getpwnam for host init verifier
Bug: 36970783
Test: test bullhead successfully at TOT
Test: create errors and check that they're caught
Test: create uid in passwd and check that it's successful
Change-Id: I237fb8df16a294757fe898bdbbd42e850bcb8301
2018-05-30 15:43:40 -07:00
Tom Cherry 194b5d1da9 init: handle properties and imports for host init verifier
Allow specifying properties on the command line when running host init
verifier.  This is needed particularly for importing files that have a
property expansion in their path.

Handle the import statement on host, basing paths off of the out
directory of Android builds.

Bug: 36970783
Test: verify that bullhead imports the correct files and checks them
Change-Id: I4fe263016b3764a372708b559bc0c739b1b7e5e3
2018-05-30 15:43:32 -07:00
Treehugger Robot fe86a1473f Merge "Correct comment in boot image header" 2018-05-30 20:55:37 +00:00
Elliott Hughes 2baf443a21 Improve SIGILL support.
Include the illegal instruction in the header if we get a
SIGILL. Otherwise (since these tend to be one-off bit flips), we don't
usually have any information to try to confirm our suspicion that any
given instance is actually a one-off bit flip.

Also add `SIGILL` as a crasher option to easily generate such crashes.

Before:
  signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xab1456da

After:
  signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0xab1456da (*pc=0xe7f0def0)

Bug: http://b/77274448
Test: ran crasher
Change-Id: I5f8dedca5eea2b117b1b1e48430214b38e1366ed
2018-05-30 12:58:43 -07:00
Treehugger Robot ce75e71252 Merge "libmemunreachable: fix docs formatting." 2018-05-30 19:33:56 +00:00
Hridya Valsaraju d0ab4e3701 Correct comment in boot image header
Test: make
Bug: 80207223
Change-Id: I88cf7683e036ff43bbe3ff5418519c7e35e08b79
2018-05-30 10:58:14 -07:00
Elliott Hughes 1c1b6a0cdb libmemunreachable: fix docs formatting.
Bug: N/A
Test: gittiles
Change-Id: I59e7d22562cffa4e4a3c2a186523ae0f15623950
2018-05-30 10:53:46 -07:00
Treehugger Robot 680bc0b6b5 Merge "init: add keychords_test" 2018-05-30 17:27:35 +00:00
Treehugger Robot e6a878644c Merge "init: switch out keychord id with std::vector match of chords" 2018-05-30 16:12:36 +00:00
Mark Salyzyn 75b901d4a8 init: add keychords_test
Test: init_tests --gtest_filter=keychords.*
Bug: 64114943
Change-Id: I357d0c1bd56660ac28bc02b76d5632ef1b9328b7
2018-05-30 08:38:11 -07:00
Treehugger Robot dfc4ad2a9c Merge "init; remove dead cruft." 2018-05-30 01:49:29 +00:00
Elliott Hughes b0aba0fff9 init; remove dead cruft.
Bug: N/A
Test: builds
Change-Id: Ia38ef6959e8615b4f103b924ae51c19f916daa48
2018-05-29 17:05:56 -07:00
Elliott Hughes d580c441ab Merge "libbase: add host properties support." 2018-05-29 23:59:50 +00:00
Treehugger Robot 420fe5fe90 Merge "init: turn keychords into a standalone class" 2018-05-29 23:10:25 +00:00