Commit Graph

35629 Commits

Author SHA1 Message Date
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
Jaegeuk Kim a367430734 fs_mgr: format f2fs with length=xx fstab
Change-Id: Icce29ad918f20b16c9908e7fa3ae19eb8c96760b
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2017-07-19 09:55:56 -07: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
Tom Cherry 3502a5357e Merge "Remove ALOGD_IF_SLOW" am: d13547347f -s ours am: b20ff457f0 -s ours am: 852a6cd623 -s ours
am: 61aaf75202  -s ours

Change-Id: I35063f11dece7ad8d40dbfd0ab4b423918ce4916
2017-07-18 22:22:33 +00:00
Luke Song 7f386dcab9 healthd: restructure healthd_mode_charger
Refactor drawing code into separate class, and allow for split screen
drawing with offset.

Bug: 63541890
Test: Verify charging mode animation
Change-Id: I6c089460f55b8c2f75f4aa3153a5736f6f434b51
2017-07-18 15:06:46 -07:00
Tom Cherry 61aaf75202 Merge "Remove ALOGD_IF_SLOW" am: d13547347f -s ours am: b20ff457f0 -s ours
am: 852a6cd623  -s ours

Change-Id: I5a41014c62dd9c2a9c477e369007e8c5c6ce41e7
2017-07-18 22:03:44 +00:00
Quang Luong be2a262b47 Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp" am: a022ea424d
am: c1e78e1331

Change-Id: I81d4f619f38a6f511562d98fe7a0dd64c7290f81
2017-07-18 21:26:19 +00:00
Quang Luong c1e78e1331 Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp"
am: a022ea424d

Change-Id: Ie4b2131525373fef14dfa2c7a7ec1e23a50dc56a
2017-07-18 21:20:26 +00:00
Treehugger Robot a022ea424d Merge "uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp" 2017-07-18 21:16:30 +00:00
Keun-young Park 111fe96a8c Do not umount /vendor, /system, and /oem even if they are R/W. am: 45ae1b2754
am: 13dfe79028

Change-Id: I2cc0d5d6cd19949bb5d9ae537871faf475afd798
2017-07-18 21:02:22 +00:00
Keun-young Park 13dfe79028 Do not umount /vendor, /system, and /oem even if they are R/W.
am: 45ae1b2754

Change-Id: I6771f2e77f382662b4f17575d5b651c5cd0c3233
2017-07-18 20:58:51 +00:00
TreeHugger Robot 178f0472d7 Merge "fastboot: call mke2fs tools to generate ext4 image" 2017-07-18 20:36:27 +00:00
Tom Cherry 852a6cd623 Merge "Remove ALOGD_IF_SLOW" am: d13547347f -s ours
am: b20ff457f0  -s ours

Change-Id: Ia4fbc86830f36ef483eacd66f621c114f5ffad95
2017-07-18 20:23:25 +00:00
Tom Cherry b20ff457f0 Merge "Remove ALOGD_IF_SLOW"
am: d13547347f  -s ours

Change-Id: Iecd8ed7045e1f38a3cb87ab856ca2708bf86de14
2017-07-18 20:04:46 +00:00
Jin Qian d14d7c14cb fastboot: call mke2fs tools to generate ext4 image
Set MKE2FS_CONFIG to empty to use mke2fs default configs

Test: fastboot --wipe-and-use-fbe
Bug: 35219933
Change-Id: Ibc97bb125899e1f1fe820d53709fdb2ab291c171
2017-07-18 11:48:19 -07:00
Quang Luong dd6a85ccd5 uml: init: add USER_MODE_LINUX cflag, USER_MODE_LINUX case in init.cpp
Modified Android.mk to define cflag "USER_MODE_LINUX" if
TARGET_USER_MODE_LINUX := true in BoardCofig.mk.
Modified set_mmap_rnd_bits_action to return 0 if "USER_MODE_LINUX" is
defined. This is needed since uml does not support the mmap_rnd_bits
sysctl, and init would otherwise crash without this check.

Test: manual

Bug: 32523022
Change-Id: I409ef64a1fa253bfb3f9fb59d0267be159819bb8
Signed-off-by: Quang Luong <qal@google.com>
2017-07-18 18:18:31 +00:00
Keun-young Park 45ae1b2754 Do not umount /vendor, /system, and /oem even if they are R/W.
- /vendor, /system, /oem can be remounted to R/W for development
  purpose.

- In such case, umounting these partitions can lead into some processes
  not running properly during shutdown or blocking umount of fs.

- So skip them. As it is dev feature, it is up to each developer to
  understand the risk. But for normal adb sync - reboot should be ok
  as shutdown involves sync operations.

bug: 37737296
Test: adb remount,reboot, and check last kmsg

(cherry picked from commit 6e12b3887e)

Change-Id: Ia92a20aa672e68f695818e451ba2ae53af8f5ab9
2017-07-18 10:32:27 -07:00
Tom Cherry d13547347f Merge "Remove ALOGD_IF_SLOW" 2017-07-18 17:20:39 +00:00
TreeHugger Robot 6651aa741e Merge "Remove ScopedLogSeverity for debugging" 2017-07-18 08:08:34 +00:00
Jiyong Park 9d1e50b809 /data/nativetest[64] processes are running with the new ns config
Native tests under /data/nativetest[64] directory is now running with
the same linker namespace configuration as /system/bin/* processes.

This allows us to stop mimicing the linker namespace configuration of the
/system/bin/* processes using LD_LIBRARY_PATH.

Bug: 63597267
Test: run bionic-unit-tests
Test: run linker-unit-tests
Change-Id: If8e2ed0b8016e4e07bf6829735b8e02f952042d0
2017-07-18 16:45:05 +09:00
Keun-young Park 29017c10c8 Merge "Do not umount /vendor, /system, and /oem even if they are R/W." am: 11649e8925 am: c9f601a178 am: 10b74ed2a6
am: ab54410f0d

Change-Id: Ic0d033d955e2612157dc63922ee85d4722bc9fa6
2017-07-18 03:21:07 +00:00