Commit Graph

34746 Commits

Author SHA1 Message Date
Tom Cherry dea5e081ac Merge "Reland "Remove comments and code about ro.boot.slot"" 2017-09-25 23:58:30 +00:00
Saurabh Shah 90a74600d7 sync: store the num_fences from first SYNC_IOC_FILE_INFO
Fixes a bug with the signal time of devices using the
modern sync file interface. The bug only affects kernels running
an Android kernel 4.9 and later.

b/63395253

Test: tests/sync_test.cpp

Change-Id: I6fb00bcb8e16a3268c357153edd8e35a44546caa
2017-09-25 15:51:46 -07:00
Treehugger Robot 20ae530e01 Merge "Silence static analyzer warnings about memory leaks" 2017-09-25 19:41:13 +00:00
Christopher Ferris 9b91324cb0 Merge "Add a new unwind method on error." 2017-09-25 19:16:59 +00:00
Tom Cherry 211a4a5d5a Reland "Remove comments and code about ro.boot.slot"
This reverts commit c5f5fd430a.

Dependencies are now merged.

Bug: 37663204
Bug: 66437505
Change-Id: I84284b6bc37f6aae4096dec73f45ebd85d28ca9d
2017-09-25 16:04:30 +00:00
Treehugger Robot baea76dba7 Merge "tombstoned: fix another call to evconnlistener_new." 2017-09-25 12:57:30 +00:00
George Burgess IV 80136a1e41 Silence static analyzer warnings about memory leaks
The static analyzer complains that this memory is leaked regardless of
how I try to work around it (unless we escape the memory by using a
global or something, but...). Basically, as long as there's some sort
of operation on the reinterpret_cast'ed pointer, it complains. If we
remove the bitwise negations, it doesn't. Doing so would presumably
defeat the purpose of this test, though, so add a NOLINT.

Bug: 27101951
Test: mma. No more static analyzer warning for this file.
Change-Id: If9008946a2145d17b8651535141bfd7ec9224739
2017-09-24 13:36:29 -07:00
Treehugger Robot 7229576bfe Merge "Base: Warn on using ostream<< with std::string*" 2017-09-23 01:38:42 +00:00
Josh Gao ce9cc4e428 tombstoned: fix another call to evconnlistener_new.
Apply the same fix from c2e98f63 to intercept_manager.cpp.

Bug: http://b/64543673
Test: debuggerd_test
Change-Id: Ibfb919e059fa62f8336cfc1426d03ef015590136
2017-09-22 18:00:35 -07:00
Christopher Ferris b9de87f7ed Add a new unwind method on error.
If a function crashes by jumping into unexecutable code, the old method
could not unwind through that. Add a fallback method to set the pc from
the default return address location.

In addition, add a new finished check for steps. This will provide a method
to indicate that this step is the last step. This prevents cases where
the fallback method might be triggered incorrectly.

Update the libbacktrace code to unwind using the new methodology.

Update the unwind tool to use the new unwind methodology.

Add a new option to crasher that calls through a null function.

Create a new object, Unwinder, that encapsulates the a basic unwind. For now,
libbacktrace will still use the custom code.

Added new unit tests to cover the new cases. Also add a test that
crashes calling a nullptr as a function, and then has call frames in
the signal stack.

Bug: 65842173

Test: Pass all unit tests, verify crasher dumps properly.
Change-Id: Ia18430ab107e9f7bdf0e14a9b74710b1280bd7f4
2017-09-22 16:55:12 -07:00
Andreas Gampe c8f935aa5e Base: Warn on using ostream<< with std::string*
In most reasonable cases, this is actually a bug. So add a diagnostic.

Test: m
Change-Id: Ib506b45dbdbafcb1893486b08ef13ec8f11d0357
2017-09-22 16:25:58 -07:00
Treehugger Robot 643e9a536c Merge "Revert "Add derive_gid flag for mounting sdcardfs"" 2017-09-22 17:21:55 +00:00
Richard Uhler f09f965f9f Revert "Add derive_gid flag for mounting sdcardfs"
This reverts commit 8ca02bbeb5.

Causes boot loop on bullhead.

(cherry picked from commit 28dbcaa23b)

Bug: 63245673
Bug: 65660058
Test: m
Merged-In: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
Change-Id: Ife5f83ebf56fb956e5015d2797b5b47a515ec171
2017-09-22 09:03:18 -07:00
Treehugger Robot 7178e29c22 Merge "Revert "Base: Delete ostream<< with std::string*"" 2017-09-22 03:07:23 +00:00
Andreas Gampe 2db3823632 Revert "Base: Delete ostream<< with std::string*"
This reverts commit 4ef5011a7b.

Reason for revert: Breaks an internal mocking case that cannot be changed.

Test: m
Change-Id: I83f9338bde02eb2b45b3e52b66ef78490ddbeeda
2017-09-21 17:53:00 -07:00
Treehugger Robot 0bb8dcb23e Merge "bootstat: Add reboot,userrequested" 2017-09-21 20:27:35 +00:00
Tom Cherry eb00b1f3aa Merge "Revert "Remove comments and code about ro.boot.slot"" 2017-09-21 18:40:56 +00:00
Tom Cherry c5f5fd430a Revert "Remove comments and code about ro.boot.slot"
This reverts commit f4ec2c50a3.

Dependencies hadn't been merged yet.

Bug: 66437505
Change-Id: I7551b7f2f184a6fefc39e184a42dc8d323c58b89
2017-09-21 18:37:22 +00:00
Mark Salyzyn 9033bf5a2e bootstat: Add reboot,userrequested
Result of holding power button down and hitting restart.

Test: compile
Bug: 63736262
Change-Id: I271bdf135cece5fd9dc9e60ddf8add595ed3da4c
2017-09-21 11:30:29 -07:00
Treehugger Robot c7750dce6b Merge "libion: Adapt to new ION interface" 2017-09-21 01:06:32 +00:00
Treehugger Robot e3526a5ef9 Merge "Add derive_gid flag for mounting sdcardfs" 2017-09-21 00:57:48 +00:00
Treehugger Robot 65673033ab Merge "Enable libdemangle and libunwindstack on host bionic" 2017-09-20 23:30:01 +00:00
Treehugger Robot c849088284 Merge "libion: add 4.12+ kernel headers for forward compatibility" 2017-09-20 23:19:13 +00:00
Daniel Rosenberg b7c118522f Add derive_gid flag for mounting sdcardfs
Turns on the derive_gid feature for sdcardfs. This was moved
under a mount flag in the kernel.

Test: If the derive_gid flag is supported, the first mount
      should succeed. If the flag is not, the second should
      succeed.
Bug: 63245673
Change-Id: If1c1bce13d14120732e420252cb5605d33ce7c40
2017-09-20 16:04:50 -07:00
Treehugger Robot 2dd3b6e349 Merge "Base: Delete ostream<< with std::string*" 2017-09-20 21:58:39 +00:00
Treehugger Robot 3b5538965e Merge changes I45fbac4a,Ie390459d
* changes:
  bootstat: validate last kmsg and bootreason content more carefully
  bootstat: clang-format rebase
2017-09-20 20:17:19 +00:00
Dan Willemsen 0f048675b2 Enable libdemangle and libunwindstack on host bionic
libunwindstack_test:UnwindTest.* are all failing, but at least this
builds.

Test: Enable host bionic; m
Test: out/soong/host/linux_bionic-x86/nativetest64/libdemangle_test/libdemangle_test
Test: out/soong/host/linux_bionic-x86/nativetest64/libunwindstack_test/libunwindstack_test
Change-Id: Ie6c774ecb4d7a467b5ea7ae977833e9cba178f2d
2017-09-20 13:16:13 -07:00
Tom Cherry 7dcf076700 Merge "Remove comments and code about ro.boot.slot" 2017-09-20 19:21:18 +00:00
Treehugger Robot 90e9c1f06a Merge "libmetricslogger: Lookup tag ID by name at runtime." 2017-09-20 18:40:21 +00:00
Mark Salyzyn a16e437e9d bootstat: validate last kmsg and bootreason content more carefully
Establish a tighter trust relationship with digitization of the
battery level.  Validate the reboot reason collected from the last
kmsg.  Validate the last reboot reason before using for enhancing
system reboot reason.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63636262
Change-Id: I45fbac4a33c09295cda89de3b73c93a884033e3b
2017-09-20 11:28:02 -07:00
Mark Salyzyn 14b1e6d63d bootstat: clang-format rebase
Code style has drifted too far from our current clang-format
settings.

Test: compile
Side-Effects: none
Bug: 63736262
Change-Id: Ie390459db123cfadf09aa06c8dafb1ae69a72af8
2017-09-20 11:27:56 -07:00
Andreas Gampe 4ef5011a7b Base: Delete ostream<< with std::string*
In most reasonable cases, this is actually a bug. So delete the
operator overload and let the compiler complain.

Test: m
Change-Id: I7d66ec2f33cc46588b6f549876241871f19ce995
2017-09-20 10:54:20 -07:00
Tom Cherry f4ec2c50a3 Remove comments and code about ro.boot.slot
ro.boot.slot_suffix is the correct parameter.

Bug: 37663204
Test: boot sailfish
Change-Id: I72f94b3c611a2280d0732321dd8de88b0530a3cd
2017-09-20 10:14:44 -07:00
Mark Salyzyn 22a10f6766 Merge "bootstat: refine kernel panic details" 2017-09-20 14:45:17 +00:00
Treehugger Robot 15a14d1ad9 Merge "init: fix typo" 2017-09-20 00:35:30 +00:00
James Hawkins b2f4244f52 libmetricslogger: Lookup tag ID by name at runtime.
This allows the removal of the hardcoded value (which can become obsolete).

Bug: 65991710
Test: none
Change-Id: I4c9c668dbfe728852ab70d2a0ac8e6bb82a77ad3
2017-09-19 16:37:00 -07:00
Mark Salyzyn 6461089bf8 bootstat: refine kernel panic details
If bootloader reports kernel_panic, gives us permission for a
deeper check of which kind occurred.  Resolve a problem with
some kernels that do not have the 'sysrq: SysRq :' log stutter.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: Idb8978de7a4f4e3c671c6ab7efc5ebe841f7bbd8
2017-09-19 16:30:05 -07:00
Treehugger Robot 8f3989b820 Merge "libmetricslogger: Fix one incorrect (deprecated) logtag and one duplicate logtag." 2017-09-19 22:39:25 +00:00
Tom Cherry a141907ecf init: fix typo
Test: build
Change-Id: I2f6ff60356087f9fd6c6f24e3923d70b9e93dcf8
2017-09-19 13:13:17 -07:00
James Hawkins 2dcca295a6 libmetricslogger: Fix one incorrect (deprecated) logtag and one
duplicate logtag.

Bug: 65841976
Bug: 65961260
Test: none
Change-Id: I6491c3c05e3a56b45d4a77cfa83f8e14eb226e64
2017-09-19 12:03:47 -07:00
Tom Cherry f5dba11085 Merge "init: use protobuf for serialization of persistent properties" 2017-09-19 17:07:00 +00:00
Tom Cherry a97faba653 init: use protobuf for serialization of persistent properties
I probably should have done this from the start...  There's a shim to
convert my manually serialized format to protobuf, and since that has
not yet shipped, it'll be reverted in a short period of time.

Test: init unit tests
Test: upgrade from legacy and intermediate property formats successfully
Change-Id: Iad25f6c30d0b44d294230a53dd6876222d1c785b
2017-09-19 09:56:31 -07:00
Mark Salyzyn e42278d114 Merge "bootstat: reduce overall boot time" 2017-09-19 14:40:14 +00:00
Mark Salyzyn 834e89c25a Merge "bootstat: battery test fails on QC devices" 2017-09-19 14:38:39 +00:00
Mark Salyzyn 557a9d4054 bootstat: reduce overall boot time
Run bootstat as a oneshot service rather than as a series of inline
exec commands.  exec commands impact boot time.

Test: cts-tradefed run cts-dev --module CtsBootStatsTestCases
      system/core/bootstat/boot_reason_test.sh all
         (make sure it filters out new init reports)
Bug: 65736247
Change-Id: Ic9d509a8cbee4bc1e278081de1001e25ae0915fd
2017-09-19 07:36:34 -07:00
Mark Salyzyn 8a30fcabcb bootstat: battery test fails on QC devices
Send the message multiple times into the last dmesg log so that one
may be picked up without data corruption.

Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: Ie42ad1940b1eb4915e4cf6cc61815d0275a70ffe
2017-09-19 07:36:34 -07:00
Mark Salyzyn b04f454216 Merge "bootstat: bootloader stat files misspelled" 2017-09-19 14:35:36 +00:00
Mark Salyzyn 25246ddfe6 bootstat: bootloader stat files misspelled
Test: system/core/bootstat/boot_reason_test.sh
Bug: 63736262
Change-Id: I6620c9965f4af8b6a3829f1f4cdcc9b691471a71
2017-09-19 14:34:42 +00:00
Mark Salyzyn ae054903af Merge "bootstat: reboot cold, warm and hard tests failed" 2017-09-19 14:32:57 +00:00
Tom Cherry 424ed42fb4 Merge "init: add exec_background command" 2017-09-18 21:33:26 +00:00