Commit graph

30257 commits

Author SHA1 Message Date
Colin Cross
771be4c2ad Merge "libmemunreachable: turn off MEM_ALOGV messages"
am: 52998574d1

Change-Id: Ifaa83f30d115975b21e354c467f27a6839e82254
2017-06-22 23:04:10 +00:00
Treehugger Robot
52998574d1 Merge "libmemunreachable: turn off MEM_ALOGV messages" 2017-06-22 22:53:50 +00:00
Colin Cross
cd652f2159 Merge "Move libmemunreachable into namespace android"
am: ae38b373a5

Change-Id: Idb89390ff1d4e47199dcdaa7ac079553534caf62
2017-06-22 22:49:15 +00:00
Treehugger Robot
ae38b373a5 Merge "Move libmemunreachable into namespace android" 2017-06-22 22:37:43 +00:00
Colin Cross
8f596198ed Merge "libmemunreachable: clang-format everything"
am: 75752c1911

Change-Id: I5e70806ad213c3b998a3988c6b14dc2b21017b04
2017-06-22 21:04:47 +00:00
Colin Cross
75752c1911 Merge "libmemunreachable: clang-format everything" 2017-06-22 20:57:03 +00:00
Colin Cross
f3ce8bc8ae libmemunreachable: turn off MEM_ALOGV messages
The move to async safe logging in I3d3b2111f6f6bf8a0d7039295d34d5168c191651
caused MEM_ALOGV messages to print even when NDEBUG was set.

Test: builds
Change-Id: Ibebe69d8c96f8f2556991c1eb5446a77782d43c7
2017-06-22 13:46:56 -07:00
Colin Cross
a9939e9a23 Move libmemunreachable into namespace android
Putting libmemunreachable in the global C++ namespace was an oversight,
move it into namespace android.

Test: m -j checkbuild
Change-Id: I0799906f6463178cb04a719bb4054cad33a50dbe
2017-06-22 10:58:23 -07:00
Colin Cross
a83881e33c libmemunreachable: clang-format everything
clang-format -i --sort-includes $(find . -name "*.cpp" -o -name "*.h")

Test: builds
Change-Id: Ia8e0677fe7f3f26dddba3a851cd2dfab9f14e421
2017-06-22 10:58:05 -07:00
Narayan Kamath
c01e0d98f7 Merge "tombstoned: change path for traces from "anr_" to "trace_""
am: 07a57f0f28

Change-Id: Idb3826d5bacdc02e0a76d8a9af749cee9abb63d6
2017-06-22 08:35:26 +00:00
Narayan Kamath
07a57f0f28 Merge "tombstoned: change path for traces from "anr_" to "trace_"" 2017-06-22 08:30:42 +00:00
Sandeep Patil
e5341cf56a Merge changes from topic 'eng_first_stage_mount'
am: b7e2f272ee

Change-Id: I0a88bdf24261b374cfd58ff15eb390a682cf5653
2017-06-22 00:05:18 +00:00
Treehugger Robot
b7e2f272ee Merge changes from topic 'eng_first_stage_mount'
* changes:
  Revert "Revert "init: poll in first stage mount if required devices are not found""
  Revert "Revert "ueventd: remove PlatformDeviceList""
  fs_mgr: differentiate if fs_mgr_set_verity() was skipped or disabled
2017-06-21 23:55:52 +00:00
Elliott Hughes
a3cdfc930a Merge "Decode ptrace-induced SIGTRAP si_code values."
am: 293936e41c

Change-Id: I01a7f9608895542b2f2c7b602a48210e60039c6f
2017-06-21 22:08:06 +00:00
Sandeep Patil
4cbedee541 Revert "Revert "init: poll in first stage mount if required devices are not found""
This reverts commit d6fccea093.

Bug: 62681642
Bug: 62682821
Bug: 62864413

Change-Id: Ic9c27552acbd2ae312e44ea2cdf060dcf493bfe6
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-06-21 15:04:57 -07:00
Sandeep Patil
cd2ba0d184 Revert "Revert "ueventd: remove PlatformDeviceList""
This reverts commit 516ff99711.

Bug: 62864413
Bug: 62864413

Change-Id: Ie3980cd536c2c83adace063f0950128f68561105
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-06-21 15:04:57 -07:00
Sandeep Patil
95366e97dd fs_mgr: differentiate if fs_mgr_set_verity() was skipped or disabled
In case of non-secure builds (eng variant) fs_mgr_setup_verity() skips
verity checks regardless of fstab options. This is slightly different
than 'adb disable-verity' where it would first read the verity metadata
to check if verity is disabled.

So, this change adds a new return value of FS_MGR_SETUP_VERITY_SKIPPED
instead of piggy backing on the FS_MGR_SETUP_VERITY_DISABLED.

Bug: 62864413
Test: Boot sailfish

Change-Id: I42bf2bdce0ecb18b4c3b568e2bc96bf1590dfb35
Signed-off-by: Sandeep Patil <sspatil@google.com>
2017-06-21 15:04:46 -07:00
Treehugger Robot
293936e41c Merge "Decode ptrace-induced SIGTRAP si_code values." 2017-06-21 21:59:25 +00:00
Yueyao Zhu
7a79592e4e Merge "healthd: add battery health status values from JEITA spec"
am: 5dd87c4ef6

Change-Id: I6fa7b04fc8f274527074f323afc586239e8d478d
2017-06-21 19:27:55 +00:00
Treehugger Robot
5dd87c4ef6 Merge "healthd: add battery health status values from JEITA spec" 2017-06-21 19:11:45 +00:00
Tom Cherry
b0350407f0 Merge "Revert "ueventd: remove PlatformDeviceList""
am: 9c5f614945

Change-Id: Id20400ea7f34fb202219da3b998d81302edc05df
2017-06-21 18:57:43 +00:00
Tom Cherry
57579dd8c9 Merge "Revert "init: poll in first stage mount if required devices are not found""
am: c9a27f79ad

Change-Id: I2a880097fe04c6b2fb859cca0bb4729e1f655eea
2017-06-21 18:57:21 +00:00
Tom Cherry
9c5f614945 Merge "Revert "ueventd: remove PlatformDeviceList"" 2017-06-21 18:42:22 +00:00
Tom Cherry
516ff99711 Revert "ueventd: remove PlatformDeviceList"
Bug: 62864413

This reverts commit c94ce7b130.

Change-Id: I014360251e5cda89c87adfec46d8b1e5000f3a9c
2017-06-21 18:42:07 +00:00
Tom Cherry
c9a27f79ad Merge "Revert "init: poll in first stage mount if required devices are not found"" 2017-06-21 18:41:57 +00:00
Tom Cherry
d6fccea093 Revert "init: poll in first stage mount if required devices are not found"
Bug: 62864413

This reverts commit ccf0d39316.

Change-Id: I343e304db4c0e7af2402397ef468cc743a3f08a9
2017-06-21 18:40:58 +00:00
Narayan Kamath
b123220dd6 tombstoned: change path for traces from "anr_" to "trace_"
The only case where tombstoned creates files for java traces is
when the process is signalled "by hand" using "shell kill -3", or
by the program itself. Such traces do not correspond to an ANR, so
name those files "trace_XX".

When dumpstate / system_server want to dump java traces, they set up
a tombstoned intercept and manage the lifetime of any associated file
that themselves.

Bug: 32064548
Test: manual, debuggerd_test
Change-Id: I97006ec7c0cd35de4b9564f535e77af846cc3891
2017-06-21 18:00:09 +01:00
Elliott Hughes
336a52e00c Decode ptrace-induced SIGTRAP si_code values.
Example:

  signal 5 (SIGTRAP), code -32763 (PTRACE_EVENT_STOP), fault addr 0x274e00005fb3

I'm tempted to say that %d isn't the best choice for si_code, but as long as
we're fully decoding all the values, I don't think it matters.

Bug: http://b/62856172
Test: manual debuggerd run
Change-Id: Ieeca690828e1e12f4162bbadece53f4aa7b9537a
2017-06-21 08:45:33 -07:00
Elliott Hughes
d10d64b244 Merge "Shave a stack frame off asserts."
am: 199c27734f

Change-Id: I4f67fa72d783c5fcdfa0c36291d06ba1edc8955c
2017-06-21 15:15:47 +00:00
Elliott Hughes
199c27734f Merge "Shave a stack frame off asserts." 2017-06-21 15:09:55 +00:00
Yueyao Zhu
9bbfbf7ffe healthd: add battery health status values from JEITA spec
Some vendors implement JEITA battery health spec.

Bug: 35780570
Test: build and boot
Change-Id: I532cd0fbdbcae0a32879de7d7930f3ccb8605ffd
2017-06-20 18:08:51 -07:00
Elliott Hughes
1496863091 Merge "Give a clear error message if we can't start the server."
am: b6d3f28287

Change-Id: I47ffda6e9ee89aad714c53fb8647c3d8bf0eab20
2017-06-21 00:58:22 +00:00
Treehugger Robot
b6d3f28287 Merge "Give a clear error message if we can't start the server." 2017-06-21 00:48:30 +00:00
Elliott Hughes
56731b4e2f Shave a stack frame off asserts.
We can't implement MEM_LOG_ALWAYS_FATAL_IF any more, but it wasn't really
useful anyway.

Bug: N/A
Test: ran `crasher assert` and `crasher64 assert`
Change-Id: I4ae2d82fdfdd58cf8ef1dfb6c401cef4ba9d3e88
2017-06-20 17:31:29 -07:00
Martijn Coenen
a8abd88010 Merge "Remove libmemunreachable from the VNDK."
am: e264c7bf4f

Change-Id: Id7d372c52b5ada7e05b8ed1353c6dae0c97dfa1b
2017-06-21 00:10:22 +00:00
Martijn Coenen
e264c7bf4f Merge "Remove libmemunreachable from the VNDK." 2017-06-20 23:58:15 +00:00
Tom Cherry
492a595091 Merge "init: poll in first stage mount if required devices are not found"
am: 20e9312344

Change-Id: I3055e999ff976662da18818756fc6ed07b09f360
2017-06-20 21:32:04 +00:00
Tom Cherry
1632742602 Merge "ueventd: remove PlatformDeviceList"
am: 137ee511bd

Change-Id: I3f49da6815cc0044e200565043b1ce0adbf39d26
2017-06-20 21:31:40 +00:00
Tom Cherry
20e9312344 Merge "init: poll in first stage mount if required devices are not found" 2017-06-20 21:24:23 +00:00
Tom Cherry
ccf0d39316 init: poll in first stage mount if required devices are not found
First stage mount in init currently attempts to regenerate uevents for
specific devices to create the corresponding dev nodes.  However, this
is racy as first stage mount happens early in the boot process and
it's possible that some of these devices have not yet been created by
the kernel.

To fix this issue, init will poll on the uevent socket for up to 10
seconds waiting for the kernel to create the required device.  It will
return false and panic if this 10 second timeout passes.

Note that the same uevent socket is used in the uevent regeneration
and the polling code, so there is no race if the device is created
after the uevent regeneration and before polling starts; the first
poll will pick up the device.

Bug: 62681642
Bug: 62682821
Test: Boot bullhead
Test: Boot sailfish
Test: Boot hikey + hotplug/unplug sdcard
Change-Id: I4a6ff043eb7115b729ca4954ebc6c9e000132993
2017-06-20 21:23:42 +00:00
Tom Cherry
137ee511bd Merge "ueventd: remove PlatformDeviceList" 2017-06-20 21:23:17 +00:00
Elliott Hughes
6eadee8607 Give a clear error message if we can't start the server.
Bug: http://b/35218713
Test: adb kill-server ; export HOME=/ ; adb devices
Change-Id: I53cc30213be0eab84e42b09c7b501362d6e44b05
2017-06-20 14:21:41 -07:00
Tom Cherry
c94ce7b130 ueventd: remove PlatformDeviceList
In order to create symlinks for USB and block devices, the path for
their parent platform device must be known.

Previously, ueventd would save each platform device that it encounters
to a list and query this list when creating the symlinks.  That,
however, is racy because the uevent socket does not differentiate
uevents from RegenerateUevents() and uevents sent by the kernel when
probing a device first the first time.  The below scenario is the
faulty  case:

1) Kernel probes parent platform device for a block device
2) ueventd calls RegenerateUevents() and starts processing uevents
3) Kernel probes block device and sends its uevents
4) ueventd picks up the block device uevent during its uevent processing,
   without yet regenerating the platform device uevent, causing improper
   symlinks to be created.

This change stops storing the platform devices in a list, and instead
traverses up the directory structure for each USB or block device
until it reaches a platform device, defined as one whose subsystem is
the platform bus.  This fixes the race and simplifies the ueventd
code.

Bug: 62436493
Bug: 62681642
Test: Boot bullhead
Test: Boot sailfish
Test: Init unit tests
Test: Boot hikey + hotplug/unplug sdcard
Change-Id: I21636355d8e434f30e0cba568598a6cf139e67f9
2017-06-20 21:21:14 +00:00
Christopher Ferris
60d677147e Merge "Fix some memory leaks, potential errors."
am: 9d239ec6a5

Change-Id: Iefc25a779c07a80457cc6ee6f6cb269655a05ccd
2017-06-20 18:39:12 +00:00
Christopher Ferris
9d239ec6a5 Merge "Fix some memory leaks, potential errors." 2017-06-20 18:29:24 +00:00
Alex Naidis
7ce1bdec47 Merge "libcutils: Clarify schedboost_enabled()"
am: 643b4776b5

Change-Id: Iea24290c320a99eae7a8c9174e60a0441b0378d8
2017-06-20 18:19:19 +00:00
Treehugger Robot
643b4776b5 Merge "libcutils: Clarify schedboost_enabled()" 2017-06-20 18:10:15 +00:00
Martijn Coenen
ce102dd74f Remove libmemunreachable from the VNDK.
It depends on functionality in the bionic
allocator, which may get updated independently
of the vendor partition (as libc is in the LL-NDK).

Bug: 33241851
Test: builds
Change-Id: I435679843229d0d4d2e2be7bfe8c27f558a016dd
2017-06-20 10:11:55 -07:00
Narayan Kamath
9be5dbed91 Merge "zip_archive_test: compare error codes directly."
am: d1e9e7bc06

Change-Id: Ibff1f3b34993391cd62c9c9f1d90adb62b4e70a8
2017-06-20 10:55:19 +00:00
Narayan Kamath
d1e9e7bc06 Merge "zip_archive_test: compare error codes directly." 2017-06-20 10:50:27 +00:00