Commit graph

31367 commits

Author SHA1 Message Date
Steven Moreland
94f3ca8776 Merge "init: add class_restart" am: 8678872a00 am: ee7137208e
am: 0bd29405c0

Change-Id: I068cfa11752439d68b6f62a7cbc473250c7ab068
2017-03-28 04:36:41 +00:00
Steven Moreland
0bd29405c0 Merge "init: add class_restart" am: 8678872a00
am: ee7137208e

Change-Id: I374ccbdf12eb2dc797ce3d6cc815983730ca5fcd
2017-03-28 04:32:10 +00:00
Steven Moreland
ee7137208e Merge "init: add class_restart"
am: 8678872a00

Change-Id: I92e6669b0e0a9b87fffc400f8a1ee2699bdda7fc
2017-03-28 04:27:40 +00:00
Treehugger Robot
8678872a00 Merge "init: add class_restart" 2017-03-28 04:22:47 +00:00
Josh Gao
b1bb1acd70 Merge "debuggerd_client: properly wait for completion." am: 372d8a2931 am: 6340d91308
am: 47df3d4c66

Change-Id: I036304dbf6eaf3fee45986eca1df70990dcca9eb
2017-03-28 03:33:36 +00:00
Josh Gao
47df3d4c66 Merge "debuggerd_client: properly wait for completion." am: 372d8a2931
am: 6340d91308

Change-Id: I90058d0d8bb89a839b262456e1b91ef15abfa71f
2017-03-28 03:29:36 +00:00
Josh Gao
6340d91308 Merge "debuggerd_client: properly wait for completion."
am: 372d8a2931

Change-Id: I16cc3b9538e9b9b0ca3662b0a2f64b55aa38100a
2017-03-28 03:24:35 +00:00
Treehugger Robot
372d8a2931 Merge "debuggerd_client: properly wait for completion." 2017-03-28 03:21:39 +00:00
Tom Cherry
8557b0e5a2 Merge "init: remove superfluous forward definitions" am: deb23ba2c1 am: 256c8f5076
am: 856441d07f

Change-Id: I6f3a642497d549a766146dfbb9b0cf72497ed85f
2017-03-28 02:40:04 +00:00
Tom Cherry
856441d07f Merge "init: remove superfluous forward definitions" am: deb23ba2c1
am: 256c8f5076

Change-Id: If844bf1c8c38465365bdc9d8b0f4c78c045c7b8f
2017-03-28 02:35:59 +00:00
Tom Cherry
256c8f5076 Merge "init: remove superfluous forward definitions"
am: deb23ba2c1

Change-Id: Ic8126b783cf8083a64cc0955074f586420685cdd
2017-03-28 02:32:10 +00:00
Treehugger Robot
deb23ba2c1 Merge "init: remove superfluous forward definitions" 2017-03-28 02:22:51 +00:00
Tom Cherry
307e12d429 Merge "init: Fix README.md for writepid" am: 88d6b4af16 am: dc597affcc
am: b64b91ccaa

Change-Id: I5230ce4b416de3afa2caaebb23506aaa6b0cbd8f
2017-03-28 01:22:22 +00:00
Tom Cherry
b64b91ccaa Merge "init: Fix README.md for writepid" am: 88d6b4af16
am: dc597affcc

Change-Id: I75ea8f8f2b3ddff6af353498337153d21a86d91a
2017-03-28 01:17:57 +00:00
Tom Cherry
dc597affcc Merge "init: Fix README.md for writepid"
am: 88d6b4af16

Change-Id: Ic65adea2c9fc69118890f0be79f45152be307bcf
2017-03-28 01:13:57 +00:00
Treehugger Robot
88d6b4af16 Merge "init: Fix README.md for writepid" 2017-03-28 01:07:50 +00:00
Tom Cherry
46b6c43b7c init: remove superfluous forward definitions
Test: Boot bullhead
Change-Id: I4a005616a825529bc2ad1b413e51b501f6407cbd
2017-03-27 17:55:37 -07:00
Wei Wang
d436414b7f Merge "init: add support of multiple class names" am: 3c1568aa13 am: fd450bb95a
am: 4640918495

Change-Id: I0c0d72650196bdbf5288c07c114f57d3e43c9a87
2017-03-28 00:55:25 +00:00
Wei Wang
4640918495 Merge "init: add support of multiple class names" am: 3c1568aa13
am: fd450bb95a

Change-Id: Ia859d1817eb80a34f339fe99894bffa4163440ce
2017-03-28 00:51:25 +00:00
Wei Wang
fd450bb95a Merge "init: add support of multiple class names"
am: 3c1568aa13

Change-Id: Ib018fc301449ab8f2d1db8550724c11d5df0430e
2017-03-28 00:47:55 +00:00
Bowgo Tsai
9b83226871 Merge "fs_mgr_avb: allow top-level vbmeta struct to be in 'boot' partition" am: ea057b46e0 am: 75ada5fce3
am: f6b7adb464

Change-Id: I375d5a1129253d9c08e6b57039487f094bf3dd42
2017-03-28 00:43:24 +00:00
Bowgo Tsai
f6b7adb464 Merge "fs_mgr_avb: allow top-level vbmeta struct to be in 'boot' partition" am: ea057b46e0
am: 75ada5fce3

Change-Id: I7e0e955d11a7f956f70bc04a95a2fe31fb2d5a4b
2017-03-28 00:39:24 +00:00
Treehugger Robot
3c1568aa13 Merge "init: add support of multiple class names" 2017-03-28 00:39:09 +00:00
Bowgo Tsai
75ada5fce3 Merge "fs_mgr_avb: allow top-level vbmeta struct to be in 'boot' partition"
am: ea057b46e0

Change-Id: Ib7583cd28f93e882a00dade3507ee75183674115
2017-03-28 00:35:57 +00:00
Treehugger Robot
ea057b46e0 Merge "fs_mgr_avb: allow top-level vbmeta struct to be in 'boot' partition" 2017-03-28 00:28:33 +00:00
Wei Wang
d04ab5abfb Merge "libcutils: remove schedgroup" am: 3d8911fbbe am: c0fc8e7b7b
am: eb6d588cd6

Change-Id: I0a088c378ade4c3eccc338eb4d7a5b5894b5bfbc
2017-03-28 00:28:25 +00:00
Wei Wang
eb6d588cd6 Merge "libcutils: remove schedgroup" am: 3d8911fbbe
am: c0fc8e7b7b

Change-Id: I348e7151248f3116f483f6c5ae4e7c924fe75490
2017-03-28 00:24:53 +00:00
Wei Wang
c0fc8e7b7b Merge "libcutils: remove schedgroup"
am: 3d8911fbbe

Change-Id: I351d6c199512cc8e5c5cd466452ea910f69061e7
2017-03-28 00:21:53 +00:00
Treehugger Robot
3d8911fbbe Merge "libcutils: remove schedgroup" 2017-03-28 00:15:46 +00:00
Josh Gao
ae9d7676a5 debuggerd_client: properly wait for completion.
Use an intermediate pipe to detect and report when a requested dump has
completed.

Bug: http://b/35241370
Bug: http://b/35813071
Test: debuggerd_test
Test: manually triggered a background ANR
Change-Id: If14aedf6071288360f1a7853d5a2ee79db121759
2017-03-27 16:11:38 -07:00
Mark Salyzyn
bd10ce02a7 Merge "logcat: test: run 256 simultaneous logcats" am: b15429c0ea am: 232b57c60b
am: c974c79c8c

Change-Id: Ieda241167d1d87b587f3b3bdfe664901fc771cd4
2017-03-27 22:57:36 +00:00
Mark Salyzyn
c974c79c8c Merge "logcat: test: run 256 simultaneous logcats" am: b15429c0ea
am: 232b57c60b

Change-Id: I83fba7238ee3632211008b5d80080ff403efbda9
2017-03-27 22:54:33 +00:00
Mark Salyzyn
232b57c60b Merge "logcat: test: run 256 simultaneous logcats"
am: b15429c0ea

Change-Id: I88aaf94060873c6aebfd30f169741afa43616371
2017-03-27 22:51:36 +00:00
Mark Salyzyn
b15429c0ea Merge "logcat: test: run 256 simultaneous logcats" 2017-03-27 22:46:03 +00:00
Mark Salyzyn
02ce4262dc Merge changes I96998c4b,I161bf03b am: dd0cd8d88f am: f17500474a
am: 77a1fa9070

Change-Id: I5b296f6c1b01a8b2dc51c7ebbd44d599a3aa49c1
2017-03-27 22:42:44 +00:00
Keun-young Park
abca5ef027 Merge "update shutdown sequence and use shutdown_timeout to cover all wait" am: 59cebb6e6f am: bfb9bea368
am: 3c86cc4bc8

Change-Id: I272adaa945dd14c6bb311040db6e9a414f3adfea
2017-03-27 22:42:29 +00:00
Mark Salyzyn
77a1fa9070 Merge changes I96998c4b,I161bf03b am: dd0cd8d88f
am: f17500474a

Change-Id: I1458020e121f52070082b7dc6791f1fc2079c131
2017-03-27 22:39:37 +00:00
Keun-young Park
3c86cc4bc8 Merge "update shutdown sequence and use shutdown_timeout to cover all wait" am: 59cebb6e6f
am: bfb9bea368

Change-Id: I35d70a225670c1946e0a705e174c856ebe67ba7a
2017-03-27 22:39:25 +00:00
Mark Salyzyn
f17500474a Merge changes I96998c4b,I161bf03b
am: dd0cd8d88f

Change-Id: I54191d23beed6fa2a2703a5cf8cb688b5c7a50fc
2017-03-27 22:35:19 +00:00
Keun-young Park
bfb9bea368 Merge "update shutdown sequence and use shutdown_timeout to cover all wait"
am: 59cebb6e6f

Change-Id: I4a09594aba83bc489c9e1735b27e4dbdf5256385
2017-03-27 22:35:03 +00:00
Mark Salyzyn
dd0cd8d88f Merge changes I96998c4b,I161bf03b
* changes:
  logd: last iterator initialized incorrectly
  logd: ASAN cleansing
2017-03-27 22:28:35 +00:00
Keun-young Park
59cebb6e6f Merge "update shutdown sequence and use shutdown_timeout to cover all wait" 2017-03-27 22:27:30 +00:00
Mark Salyzyn
1f46716f1c logd: last iterator initialized incorrectly
last should start with mLogElements.end() and be updated as
we iterate to find a matching time entry in the list. Since
it is impossible(sic) for a newer start time to be supplied
than the list, the incorrect iterator initialization should
be inconsequential, but if it ever happens this change will
behave correctly and dump nothing.

Test: gTest liblog-unit-tests, logd-unit-tests and logcat-unit-tests
Bug: 36536248
Bug: 36608728
Change-Id: I96998c4b713258f29d5db2e24a83ae562ddf3420
2017-03-27 21:26:13 +00:00
Wei Wang
641ff0a4d8 init: add support of multiple class names
Add support of multiple class names in service, so that related services
can be grouped together. By doing this, we can start/stop some services
for special purpose. For example, early zygote, early boot animation
and etc.

Bug: 36535312
Test: marlin boots with defined classes
Change-Id: Ifeaaf034fd836816e24f3775bece53ea83faada6
2017-03-27 20:59:05 +00:00
Steven Moreland
2b63d54af8 init: add class_restart
Bug: 34093663
Test: hwservicemanager `onrestart class_restart hal` works
Change-Id: Ie1e4daab2b7b4c6c714d4e3d05afa2d86d6233df
2017-03-27 13:52:47 -07:00
Keun-young Park
3ee0df9bdf update shutdown sequence and use shutdown_timeout to cover all wait
- Use ro.build.shutdown_timeout to cover the total time for shutdown.
  Limit wait time for termination only to half of shutdown_timeout
  with max of 3 secs as process not terminating by that time
  will not terminate anyway. It is better to move to the next
  stage quickly. fsck time for user shutdown is excluded from timeout.
- Change last detach to kill, sync, and umount. Last detach did not
  work in many tests.
- add sync after emulated partitions umount as it can trigger
  change in /data.

bug: 36551393
Test: many reboots
Change-Id: Ib75dc19af79b8326b02ccef6b16a8817ae7f8b0e
2017-03-27 13:44:50 -07:00
Mark Salyzyn
0484b3b575 logd: ASAN cleansing
A mixture of fixes and cleanup for LogKlog.cpp and friends.

- sscanf calls strlen.  Check if the string is missing a nul
  terminator, if it is, do not call sscanf.
- replace NULL with nullptr for stronger typechecking.
- pass by reference for simpler code.
- Use ssize_t where possible to check for negative values.
- fix FastCmp to add some validity checking since ASAN reports that
  callers are not making sure pre-conditions are met.
- add fasticmp templates for completeness.
- if the buffer is too small to contain a meaningful time, do not
  call down to log_time::strptime() because it does not limit its
  accesses to the buffer boundaries, instead stopping at a
  terminating nul or invalid match.
- move strnstr to LogUtils.h, drop size checking of needle and
  clearly report the list of needles used with android::strnstr
- replace 'sizeof(static const char[]) - 1' with strlen.

Test: gTest liblog-unit-test, logd-unit-tests & logcat-unit-tests
Bug: 30792935
Bug: 36536248
Bug: 35468874
Bug: 34949125
Bug: 34606909
Bug: 36075298
Bug: 36608728
Change-Id: I161bf03ba029050e809b31cceef03f729d318866
2017-03-27 13:32:57 -07:00
Jeff Vander Stoep
e929507fe2 Merge "Move selinux policy build decisions to sepolicy Makefile" am: 784c851785 am: b19825012e
am: cf4fdc1c6a

Change-Id: I1348e7629cb9708df99dd3a0e867d168331f08db
2017-03-27 20:12:20 +00:00
Jeff Vander Stoep
cf4fdc1c6a Merge "Move selinux policy build decisions to sepolicy Makefile" am: 784c851785
am: b19825012e

Change-Id: I78d6d58f31e5e7c77178b949e629c99257c90ea5
2017-03-27 20:09:49 +00:00
Jeff Vander Stoep
b19825012e Merge "Move selinux policy build decisions to sepolicy Makefile"
am: 784c851785

Change-Id: If07e860115d028acd98b62488326eeb9c9a49ceb
2017-03-27 20:06:50 +00:00