Commit Graph

35597 Commits

Author SHA1 Message Date
Bowgo Tsai e5de94756b Merge "fs_mgr_verity: allow verification error when the device is unlocked" am: a68f633675
am: 84937296c6

Change-Id: Ia71076213c9a6770ff35b999024b1d223c82bd77
2017-07-20 01:58:05 +00:00
Bowgo Tsai 84937296c6 Merge "fs_mgr_verity: allow verification error when the device is unlocked"
am: a68f633675

Change-Id: Iba60c7f544ae86a1487354a9e799cab7167f37ad
2017-07-20 01:55:04 +00:00
Treehugger Robot a68f633675 Merge "fs_mgr_verity: allow verification error when the device is unlocked" 2017-07-20 01:48:34 +00:00
Keun-young Park c111537f5d init: Do full shutdown even for thermal shutdown
- Skipping SIGTERM / SIGKILL / umount brings race between block
  device driver and fs layer. Do umount before shutting down.
- Reduce timeout to 1 sec for thermal shutdown and skip other time
  taking part like fsck.
- Refactor waiting part to check time in ms so that 1 sec can
  have enough resolution.

bug: 63686426
Test: adb shell setprop sys.powerctl thermal-shutdown, adb shell setprop sys.powerctl reboot and check dmesg
Merged-In: I048bac767b328c8d656a97fe65dde5f2b5bf4ae5
Change-Id: I048bac767b328c8d656a97fe65dde5f2b5bf4ae5
2017-07-19 18:38:20 -07:00
Tom Cherry 1bd7187f32 Merge "ueventd: fixup ueventd_test.cpp" am: 9aaf66b61f am: 34d4d57b87 am: 5d256bc555
am: 5b1202976e

Change-Id: Icf00ff2e4f9a949900ab6b71bba89c3815c4b5d2
2017-07-20 01:26:25 +00:00
Luke Song 23471afe84 resolve merge conflicts of 74a5f22d9 to oc-dr1-dev-plus-aosp
Test: I solemnly swear I tested this conflict resolution.

Change-Id: Iad367b2998311e327151dbd8e9295259f6661f77
2017-07-19 18:25:51 -07:00
Tom Cherry 5b1202976e Merge "ueventd: fixup ueventd_test.cpp" am: 9aaf66b61f am: 34d4d57b87
am: 5d256bc555

Change-Id: I430e26f820653edfe35ededffa853dcf5e1324ad
2017-07-20 01:20:30 +00:00
Tom Cherry 5d256bc555 Merge "ueventd: fixup ueventd_test.cpp" am: 9aaf66b61f
am: 34d4d57b87

Change-Id: I7468e871785ea74e6cd5b070bd6f18153f6304a7
2017-07-20 01:17:31 +00:00
Tom Cherry 34d4d57b87 Merge "ueventd: fixup ueventd_test.cpp"
am: 9aaf66b61f

Change-Id: I7792c9ec68b6011e0186af2d40ca07d0801a4c2f
2017-07-20 01:15:00 +00:00
Tom Cherry 9aaf66b61f Merge "ueventd: fixup ueventd_test.cpp" 2017-07-20 01:05:28 +00:00
Luke Song 74a5f22d9f Merge "healthd: restructure healthd_mode_charger" into oc-dr1-dev 2017-07-20 01:02:06 +00:00
Luke Song e214caef46 Merge "healthd: restructure healthd_mode_charger" 2017-07-20 00:55:18 +00:00
Keun-young Park 30173874fc init: Do full shutdown even for thermal shutdown
- Skipping SIGTERM / SIGKILL / umount brings race between block
  device driver and fs layer. Do umount before shutting down.
- Reduce timeout to 1 sec for thermal shutdown and skip other time
  taking part like fsck.
- Refactor waiting part to check time in ms so that 1 sec can
  have enough resolution.

bug: 63686426
Test: adb shell setprop sys.powerctl thermal-shutdown, adb shell setprop sys.powerctl reboot and check dmesg
Change-Id: I048bac767b328c8d656a97fe65dde5f2b5bf4ae5
2017-07-19 17:27:05 -07:00
Keun-young Park 366c51ec1e dump stack before kill all
- If problematic process is from user, kill all kills
  it and dump does not show problematic process.

bug: 37737296
Test: reboot and check log

Merged-In: Iaa4f7d12f5a40fa7528c6672567c36e30b140372
Change-Id: Iaa4f7d12f5a40fa7528c6672567c36e30b140372
2017-07-19 17:11:36 -07:00
TreeHugger Robot ac5e72fc56 Merge "fastboot: add mke2fs and e2fsdroid to build package" 2017-07-20 00:10:53 +00:00
Luke Song 1d540dd0f4 healthd: restructure healthd_mode_charger
Refactor drawing code into separate class, and allow for split screen
drawing with offset.

Cherry picked from commit 7f386dcab9

Bug: 63541890
Test: Verify charging mode animation
Change-Id: I6c089460f55b8c2f75f4aa3153a5736f6f434b51
2017-07-19 22:46:54 +00:00
Christopher Ferris 96722b0fa4 Cleanup the libbacktrace interface a bit.
- Change the field name load_base to load_bias (which is what it really is).
- Add a rel_pc field so that callers do not need to compute it themselves.
- Remove the BacktraceMap::GetRelativePc() since nobody should need to
  compute this themselves.

Bug: 23762183

Test: Compiles and unit tests pass (debuggerd, libbacktrace).
Change-Id: I2cb579767120adf08c407a58f3c487ee3f2b45fc
2017-07-19 15:36:32 -07:00
Keun-young Park d4f4a3fcf9 Merge "dump stack before kill all" am: c13a2da2f4 am: 4e24aa2bc3 am: 2b33d96db1
am: f0a13c35f2

Change-Id: Id42c59a6488a9405c8f3301585d2b8cb18192197
2017-07-19 22:32:50 +00:00
Keun-young Park f0a13c35f2 Merge "dump stack before kill all" am: c13a2da2f4 am: 4e24aa2bc3
am: 2b33d96db1

Change-Id: Ic9c86ce7ddf8591a9fb2d3b1cdf72057c21d4111
2017-07-19 22:29:51 +00:00
Tom Cherry 2ef572be30 ueventd: fixup ueventd_test.cpp
Use ASSERT_EQ() instead of EXPECT_EQ() to prevent segfaults after
failed API calls.

Do not run setfscreatecon_IsPerThread unless we're in permissive mode
as it will not pass otherwise.

Test: init unit tests
Change-Id: I70525d438e89f1ec036255890169a50b5007b4c4
2017-07-19 15:29:20 -07:00
Keun-young Park 2b33d96db1 Merge "dump stack before kill all" am: c13a2da2f4
am: 4e24aa2bc3

Change-Id: If924fe081a81c2061ed06e741fc5e6984e24b1f9
2017-07-19 22:26:22 +00:00
Keun-young Park 4e24aa2bc3 Merge "dump stack before kill all"
am: c13a2da2f4

Change-Id: Ie09fd8a7e95686c41d2a7af9e9e291f89c673036
2017-07-19 22:23:48 +00:00
Jin Qian 6ce78321a2 fastboot: add mke2fs and e2fsdroid to build package
Bug: 23686092
Bug: 63849632
Change-Id: Iff0d92b7174597d43ee646847888aedc2080052a
2017-07-19 15:21:15 -07:00
Keun-young Park c13a2da2f4 Merge "dump stack before kill all" 2017-07-19 22:17:06 +00:00
Christopher Ferris eb4a6dbf5c Speed up StepIfSignalHandler path.
The StepIfSignalHandler code reads from the process memory object, which
is currently the slowest way to read memory. Change the code to read from
the elf memory object which will almost always be a memory mapped file and
should be really fast.

Also, move the tests for StepIfSignalHandler to its own file.

Bug: 23762183

Test: Unit tests pass.
Change-Id: I1100b50554e5ef736a87babd484f3f34e9071caa
2017-07-19 21:35:46 +00:00
Christopher Ferris 477b08d7ee Merge "Add signal handling to the register object." am: 33913ebfb5 am: b945cc6de0 am: 2f80aa506f
am: 9f7c071743

Change-Id: I04440b9eb7516473f36ade40f779fce4758d881d
2017-07-19 15:52:51 +00:00
Christopher Ferris 9f7c071743 Merge "Add signal handling to the register object." am: 33913ebfb5 am: b945cc6de0
am: 2f80aa506f

Change-Id: I0df6230ffb131aa0537802e00192ce9154963d02
2017-07-19 15:50:22 +00:00
Christopher Ferris 2f80aa506f Merge "Add signal handling to the register object." am: 33913ebfb5
am: b945cc6de0

Change-Id: I31c954a03229b264e1bb2a8a75ef5972e60b2bf2
2017-07-19 15:47:21 +00:00
Christopher Ferris b945cc6de0 Merge "Add signal handling to the register object."
am: 33913ebfb5

Change-Id: Icfaa2cca55a5aef4b48f58026a64395a267a517b
2017-07-19 15:44:24 +00:00
Steven Moreland 68c699a0aa Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa am: 6208cd1322 am: 106c355688
am: 57db1511bd

Change-Id: If1de13ecd84a5bf43edefd844e1b46104bddf9a0
2017-07-19 15:39:36 +00:00
Christopher Ferris 33913ebfb5 Merge "Add signal handling to the register object." 2017-07-19 15:39:23 +00:00
Steven Moreland 57db1511bd Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa am: 6208cd1322
am: 106c355688

Change-Id: I8ddfceec58ab69b6c0952ea39f3ad78802f5d7bc
2017-07-19 15:36:37 +00:00
Steven Moreland 106c355688 Merge "system/core: use proper nativehelper headers" am: 4f59afe9fa
am: 6208cd1322

Change-Id: I74083b7169f03bbe347c8802c13cb6c9c7fad440
2017-07-19 15:34:05 +00:00
Steven Moreland 6208cd1322 Merge "system/core: use proper nativehelper headers"
am: 4f59afe9fa

Change-Id: I0fee29c0ad6e81b83cd0f3f774cd08f483a5df6c
2017-07-19 15:31:07 +00:00
Treehugger Robot 4f59afe9fa Merge "system/core: use proper nativehelper headers" 2017-07-19 15:22:41 +00:00
Bowgo Tsai b674894199 fs_mgr_verity: allow verification error when the device is unlocked
On a A/B device, the image combination in VTS is:
  - system.img (userdebug): provided by Google (system as root)
  - vendor.img (user): provided by the OEM

The generic system.img provided by Google doesn't have /verity_key.
So verified boot will fail when it tries to verify the signature of
vendor.img. This CL allows signature verification error (including
no verity_key) when the device is unlocked.

This CL also changes the return value to FS_MGR_SETUP_VERITY_SKIPPED when
signature verification failed in logging mode. Otherwise, first stage
mount will fail because it assumes verity device initialization should be
successful when receiving FS_MGR_SETUP_VERITY_SUCCESS.

Bug: 63821912
Test: boot generic system.img on a A/B device
Change-Id: I33e5ef753913ae9f0c8b02c518ae94d4c8505611
2017-07-19 18:45:40 +08:00
Keun-young Park c59b822d1f dump stack before kill all
- If problematic process is from user, kill all kills
  it and dump does not show problematic process.

bug: 37737296
Test: reboot and check log
Change-Id: Iaa4f7d12f5a40fa7528c6672567c36e30b140372
2017-07-18 18:52:25 -07:00
Robert Benea 9865760d3d Merge "Add memcg related configs to init." am: b84666cbc0 am: 7564622f88 am: 5cf308bcde
am: eab1c14aba

Change-Id: I357cef77e7e48fdda55d55dbaeac531e0974a434
2017-07-19 01:22:40 +00:00
Robert Benea eab1c14aba Merge "Add memcg related configs to init." am: b84666cbc0 am: 7564622f88
am: 5cf308bcde

Change-Id: Ic86a3200b5080438ad6cb33f9bc3f6ff2ecca22b
2017-07-19 01:12:40 +00:00
Robert Benea 5cf308bcde Merge "Add memcg related configs to init." am: b84666cbc0
am: 7564622f88

Change-Id: Ia9f5b5d524eb437598e9d453ca05e35d52445cc1
2017-07-19 01:03:32 +00:00
Robert Benea 7564622f88 Merge "Add memcg related configs to init."
am: b84666cbc0

Change-Id: I437c5d05582c6a3cce632f92835ee91f419a7190
2017-07-19 01:01:27 +00:00
Robert Benea b84666cbc0 Merge "Add memcg related configs to init." 2017-07-19 00:54:41 +00:00
Jiyong Park 5dcd83c6a0 Merge "/data/nativetest[64] processes are running with the new ns config" into oc-dr1-dev am: c5aba9702e
am: df13c1473d

Change-Id: I42d01009bef11774a3a1c7e22771d9ef72f8f39d
2017-07-19 00:42:15 +00:00
Jiyong Park df13c1473d Merge "/data/nativetest[64] processes are running with the new ns config" into oc-dr1-dev
am: c5aba9702e

Change-Id: Icf29b590738b6e3287b3635d352fe2c01d185fd8
2017-07-19 00:29:51 +00:00
Christopher Ferris a019665b3c Add signal handling to the register object.
- Add the StepIfSignalHandler function to the Regs object that checks
  if the code is in a signal handler.
- Add tests for new code, also add a test that unwinds through a signal
  handler.
- Slight modification to Elf to fail if a bad machine type is encountered.
  Add tests for this.

Bug: 23762183

Test: Ran unit tests.
Change-Id: Idafa1105d00b91a9343d7464ac9ed1cb95830963
2017-07-18 17:27:48 -07:00
TreeHugger Robot c5aba9702e Merge "/data/nativetest[64] processes are running with the new ns config" into oc-dr1-dev 2017-07-19 00:25:33 +00:00
Steven Moreland 00fe3ad728 system/core: use proper nativehelper headers
libnativeheader exports headers under nativeheader. These were
available before incorrectly as global headers in order to give
access to jni.h.

Test: modules using system/core find headers
Bug: 63762847
Change-Id: I86240f7857dd815100cab32ad261aa9a0a54329c
2017-07-18 17:03:20 -07:00
Quang Luong 559674dbe3 Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp" am: a022ea424d am: c1e78e1331 am: be2a262b47
am: 6bcf4fb8b5

Change-Id: I1b6656bc4ec0dbebccb4fe92c6f73f9be6965353
2017-07-18 23:24:51 +00:00
Robert Benea d485226951 Add memcg related configs to init.
Allow configuring memory.swappiness, memory.soft_limit_in_bytes
and memory.limit_in_bytes by init; by doing so there is better
control of memory consumption per native app.

Test: tested on gobo branch.
bug: 63765067
Change-Id: I8906f3ff5ef77f75a0f4cdfbf9d424a579ed52bb
2017-07-18 15:58:40 -07:00
Quang Luong 6bcf4fb8b5 Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp" am: a022ea424d am: c1e78e1331
am: be2a262b47

Change-Id: I223ebf56a8bbefb38735ebbcfe45c7d2a78cd50c
2017-07-18 22:39:00 +00:00