Commit graph

39291 commits

Author SHA1 Message Date
Mark Salyzyn
0d18efbdf8 Merge changes Iecedc3b1,I28987f08
am: dc17e9efa0

Change-Id: I144c0fa56aaae45abf3c318a0adcee2e119c71e5
2018-06-04 15:49:07 -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
cd9c084084 Merge "bootstat: Add kernel_panic,modem + related others"
am: 7c4d393c24

Change-Id: If7210a9af3563f4bcda70802b3fedbfb651c34d2
2018-06-04 10:38:26 -07:00
Bernie Innocenti
29cf429dc8 Merge "SocketListener: use poll() instead of select()"
am: 51f0f7e791

Change-Id: I88aab1d2290e1eb7b5cd38282f01cd993303665a
2018-06-04 10:30:09 -07: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
Elliott Hughes
3e44b422bf Merge "libnativeloader: add jiyong to OWNERS."
am: f875aaa339

Change-Id: I51adfe1af8a87bc1947ebbc47999939b2936a561
2018-05-31 21:00:27 -07:00
Treehugger Robot
f875aaa339 Merge "libnativeloader: add jiyong to OWNERS." 2018-06-01 02:59:57 +00:00
Inseob Kim
931e0f268a Merge "Support /product/bin"
am: 36b61f061d

Change-Id: I9f4c48794c99e338959624e240357854f51c8ccc
2018-05-31 18:40:55 -07: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
7846f38bf2 Merge "Improve SIGILL support."
am: cf252ab07d

Change-Id: Iffcf50898022089744efe51ba45cb86f745f3029
2018-05-31 18:03:38 -07:00
David Anderson
3f0225abb8 Merge "adb: add remount -R for deduplicated ext4"
am: bfb4bf05d9

Change-Id: I3bae3d47bf038af3a2ce4b1e629f6564fc9b2a49
2018-05-31 18:01:50 -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
Yifan Hong
8b328e403d Merge "androidboot.lrap => logical_partitions"
am: 05625ab420

Change-Id: I945697014403041bdddacf987f52d8f6d84be7b8
2018-05-31 17:18:37 -07: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
83c7fdcc1c Merge "init: implement getpwnam for host init verifier"
am: 1c15b02b54

Change-Id: Id268013a2a115124eea67d253c2e4808e1a2d1f9
2018-05-31 11:31:40 -07:00
Tom Cherry
1c15b02b54 Merge "init: implement getpwnam for host init verifier" 2018-05-31 17:30:50 +00:00
Tom Cherry
758102af2b Merge "init: handle properties and imports for host init verifier"
am: 279de56b3e

Change-Id: Ifd22aee4611792065fecefce5a446636e90c8b22
2018-05-31 10:29:31 -07: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
Hridya Valsaraju
ffeb8793e4 Merge "Correct comment in boot image header"
am: fe86a1473f

Change-Id: I42f37a665948d60efe1af745be5ae64c7e0af7b7
2018-05-30 15:22:46 -07:00
Treehugger Robot
fe86a1473f Merge "Correct comment in boot image header" 2018-05-30 20:55:37 +00:00
Elliott Hughes
44ebe2743a Merge "libmemunreachable: fix docs formatting."
am: ce75e71252

Change-Id: Ic7f94cea184abac36bc2df9d157525f08033602e
2018-05-30 13:14:02 -07: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
Mark Salyzyn
aac3972dd3 Merge "init: add keychords_test"
am: 680bc0b6b5

Change-Id: I5b479cbc1c9f9f3734f84182f0bfcbcda1b57219
2018-05-30 10:41:57 -07:00
Treehugger Robot
680bc0b6b5 Merge "init: add keychords_test" 2018-05-30 17:27:35 +00:00
Mark Salyzyn
b93b91c7ef Merge "init: switch out keychord id with std::vector match of chords"
am: e6a878644c

Change-Id: I5dc7aeb47a5279d5fa1f91f33e43952888a8d126
2018-05-30 09:21:54 -07: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
Elliott Hughes
8d69c92b6d Merge "init; remove dead cruft."
am: dfc4ad2a9c

Change-Id: I2d5692af6ba9104b0801186aaa7ca067fe4993c0
2018-05-29 20:12:02 -07:00
Treehugger Robot
dfc4ad2a9c Merge "init; remove dead cruft." 2018-05-30 01:49:29 +00:00
Elliott Hughes
10200e4c21 Merge "libbase: add host properties support."
am: d580c441ab

Change-Id: I84f6a494544a291c168234f5c98d15d488c36e27
2018-05-29 17:46:17 -07: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
Mark Salyzyn
f29bb19686 Merge "init: turn keychords into a standalone class"
am: 420fe5fe90

Change-Id: I3c0b494743b2991b30a8a1751b8560142f3c28f1
2018-05-29 16:44:49 -07:00
Mark Salyzyn
334b4c843e Merge "init: refactor keychord for testing"
am: 16dd3582b7

Change-Id: I91303bb157aab0df7349c6af05a50f560a4ef1d1
2018-05-29 16:44:03 -07:00
Treehugger Robot
420fe5fe90 Merge "init: turn keychords into a standalone class" 2018-05-29 23:10:25 +00:00
Treehugger Robot
16dd3582b7 Merge "init: refactor keychord for testing" 2018-05-29 23:03:43 +00:00