Commit graph

33793 commits

Author SHA1 Message Date
Martijn Coenen
f8280ffeac Merge "Remove libmemunreachable from the VNDK." am: e264c7bf4f
am: a8abd88010

Change-Id: I8d6afb9bcfdf46f4c046eb2441ba5ed747ec0e53
2017-06-21 00:14:50 +00: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
e34a158b1a Merge "init: poll in first stage mount if required devices are not found" am: 20e9312344
am: 492a595091

Change-Id: I9123faa9377e8bb058d146e744106ea6e0522951
2017-06-20 21:36:31 +00:00
Tom Cherry
d989cf8f57 Merge "ueventd: remove PlatformDeviceList" am: 137ee511bd
am: 1632742602

Change-Id: I0e3ba605b26c525364371c984c6b3ebecb5f7f82
2017-06-20 21:36:04 +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
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
0da25d6feb Merge "Fix some memory leaks, potential errors." am: 9d239ec6a5
am: 60d677147e

Change-Id: I184799dd198d6469326f0c07dfb15a5323e9af69
2017-06-20 18:44:22 +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
234fae2823 Merge "libcutils: Clarify schedboost_enabled()" am: 643b4776b5
am: 7ce1bdec47

Change-Id: Ia1b594ccd71a20d787cb70b2b8750c30158b7ffe
2017-06-20 18:22:26 +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
ecc0b6c605 Merge "zip_archive_test: compare error codes directly." am: d1e9e7bc06
am: 9be5dbed91

Change-Id: I42d449eba683e2f2b158992573cacbbde2b28e27
2017-06-20 10:58:30 +00: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
Tom Cherry
fcea7cae06 Merge "Move restorecon() of /sys from init to ueventd." am: 2787894768
am: 432326ecbb  -s ours

Change-Id: Id6e749dfe32eb6d8784e6c634211e3e0750d2904
2017-06-20 04:56:30 +00:00
Tom Cherry
432326ecbb Merge "Move restorecon() of /sys from init to ueventd."
am: 2787894768

Change-Id: I45baa3ee95a630517ef94e1bca3d74637655abd9
2017-06-20 01:20:10 +00:00
Tom Cherry
2787894768 Merge "Move restorecon() of /sys from init to ueventd." 2017-06-20 01:13:37 +00:00
Tom Cherry
d2fd54e0ff Move restorecon() of /sys from init to ueventd.
ueventd already does restorecon() for /sys/{block,class,devices}, so
instead of duplicating this effort with init, move the restorecon()
that init does for all of /sys to ueventd.

Bug: 62420036
Change-Id: I6125f8ff5316a0cf45872d1100d089d71802958f
Merged-In: I6125f8ff5316a0cf45872d1100d089d71802958f
Test: Boot sailfish, bullhead
2017-06-20 00:02:05 +00:00
Christopher Ferris
051792fed4 Fix some memory leaks, potential errors.
Fix a couple of memory leaks in tests.

Fix a potential case that length could be zero.

Bug: 23762183

Test: Ran unit tests, then ran valgrind on unit tests and verified no leaks.
Change-Id: I5f7602aa0204db0488a8e305250658cdb6e977d0
2017-06-19 16:20:33 -07:00
Christopher Ferris
9c3c75ef2f Merge "Add EH frame and debug frame support." am: 27fea2c295
am: b1dc155338

Change-Id: I050d1046fd7605dc23d18219b3f7439d362225b2
2017-06-19 21:54:35 +00:00
Christopher Ferris
b1dc155338 Merge "Add EH frame and debug frame support."
am: 27fea2c295

Change-Id: Id28a8f7c2fc235ec51f941c9db6260f74d5bd1ed
2017-06-19 21:48:04 +00:00
Christopher Ferris
27fea2c295 Merge "Add EH frame and debug frame support." 2017-06-19 21:37:26 +00:00
TreeHugger Robot
a3598113ad Merge "Move restorecon() of /sys from init to ueventd." into oc-dev-plus-aosp 2017-06-19 19:36:56 +00:00
Tom Marshall
ebd6a64694 Merge "init: Run restorecon_recursive asynchronously" am: ad4aa9e169
am: 0329b8d03e

Change-Id: I1cd56fc9521451742b04d7f56bc0b657a0672314
2017-06-19 18:06:14 +00:00
Tom Marshall
0329b8d03e Merge "init: Run restorecon_recursive asynchronously"
am: ad4aa9e169

Change-Id: I809f5d08fda61b25bbed2b01dac9ee7e4ab9bfc9
2017-06-19 18:00:17 +00:00
Tom Cherry
c3e955123c Move restorecon() of /sys from init to ueventd.
ueventd already does restorecon() for /sys/{block,class,devices}, so
instead of duplicating this effort with init, move the restorecon()
that init does for all of /sys to ueventd.

Bug: 62420036
Change-Id: I6125f8ff5316a0cf45872d1100d089d71802958f
Test: Boot sailfish, bullhead
2017-06-19 10:59:06 -07:00
Treehugger Robot
ad4aa9e169 Merge "init: Run restorecon_recursive asynchronously" 2017-06-19 17:52:02 +00:00
Neil Fuller
2bb1e712a8 Merge "Move system/core/tzdatacheck to system/timezone" am: acb6473793
am: e07e6fbf72

Change-Id: Ifc45d80e5c8cbfbd2f3eefcedd6c9236d0c843b6
2017-06-19 14:08:25 +00:00
Neil Fuller
e07e6fbf72 Merge "Move system/core/tzdatacheck to system/timezone"
am: acb6473793

Change-Id: I14a77c9b6ac40b309194587f33c2f00497edb850
2017-06-19 14:02:53 +00:00
Neil Fuller
acb6473793 Merge "Move system/core/tzdatacheck to system/timezone" 2017-06-19 13:54:38 +00:00
Narayan Kamath
1ef9d2dfbe zip_archive_test: compare error codes directly.
Make them available to tests so that they can compare values
directly instead of comparing error code strings.

Test: zip_archive_test
Change-Id: I1c78c24651ff7549b5125a49a4e67bbd8295c617
2017-06-19 13:03:41 +01:00
Jiyong Park
5b2433611b Merge "Mark libdemangle as vendor_available" am: dd622c5c34
am: 14f088cb67

Change-Id: I4a47d1a532394e32abdad234d696ac8c375eef90
2017-06-19 03:36:39 +00:00
Jiyong Park
14f088cb67 Merge "Mark libdemangle as vendor_available"
am: dd622c5c34

Change-Id: I460a3dc299d3311fa7582b41e839c487aac91eca
2017-06-19 03:31:08 +00:00
Treehugger Robot
dd622c5c34 Merge "Mark libdemangle as vendor_available" 2017-06-19 03:24:09 +00:00
Jaesung Chung
205d51d333 Merge "debuggerd_test: find backtrace frame in all lines in CrasherTest" am: fae8ec2556
am: 82e543afad

Change-Id: Ib0a0ec0c94d8fff34d1390d44623697a51a0e317
2017-06-19 00:23:42 +00:00
Jaesung Chung
fe361ae7b3 Merge "logd-unit-tests: make sure use unsigned types when reading le" am: 31f2c81755
am: b9a1ff14ae

Change-Id: I2a780305fca0143ec863d1736d6ff74ff222eef2
2017-06-19 00:23:19 +00:00
Jaesung Chung
82e543afad Merge "debuggerd_test: find backtrace frame in all lines in CrasherTest"
am: fae8ec2556

Change-Id: I3f1e8d8b9131fe15b2de397b46f07bdc91f2b739
2017-06-19 00:18:49 +00:00
Jaesung Chung
b9a1ff14ae Merge "logd-unit-tests: make sure use unsigned types when reading le"
am: 31f2c81755

Change-Id: If4ad61346df17727e39bf0aa26c4dc96f8feeb24
2017-06-19 00:18:23 +00:00
Jaesung Chung
fae8ec2556 Merge "debuggerd_test: find backtrace frame in all lines in CrasherTest" 2017-06-19 00:11:51 +00:00
Jaesung Chung
31f2c81755 Merge "logd-unit-tests: make sure use unsigned types when reading le" 2017-06-19 00:10:52 +00:00
Josh Gao
3df484eeab Merge "adb: increase the shell command length limit." am: 9d2e688b9a
am: 749d2a0ab5

Change-Id: Ib450863883d11cb256421e2c4f12c36d8af37570
2017-06-17 22:06:30 +00:00
Josh Gao
749d2a0ab5 Merge "adb: increase the shell command length limit."
am: 9d2e688b9a

Change-Id: Iefd9a87912141a24d0603fa4eb824b59195217c4
2017-06-17 22:02:29 +00:00
Treehugger Robot
9d2e688b9a Merge "adb: increase the shell command length limit." 2017-06-17 21:57:12 +00:00