Commit Graph

47579 Commits

Author SHA1 Message Date
Josh Gao 0df5a1cb66 Merge "Revert "Revert "Add a way to turn off unique_fd's operator int."""
am: fe1d1e815f

Change-Id: Ifee0b9ccc107361780f79cfde8a1c7db2a849a7c
2019-05-09 20:30:55 -07:00
Josh Gao a124b20fef Merge "crash_dump: populate uid field."
am: fc9ad309ca

Change-Id: Ida0d56c2d37a6c553b3ceea6b5e736aa0b036d39
2019-05-09 20:15:16 -07:00
Xin Li 330dd24bbb [automerger skipped] Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master."
am: dbb6eb6195 -s ours
am skip reason: subject contains skip directive

Change-Id: If34ac402c1985f1bc6cc8dd5b6e229aebece8fc9
2019-05-09 19:47:38 -07:00
Xin Li 4175d6f740 [automerger skipped] DO NOT MERGE - Merge Pie Bonito/Sargo into master.
am: 3a95be9a7f -s ours
am skip reason: subject contains skip directive

Change-Id: I60c3b9cb902bca23b94d30cad982c28c5bdcb39c
2019-05-09 16:14:39 -07:00
Josh Gao fe1d1e815f Merge "Revert "Revert "Add a way to turn off unique_fd's operator int.""" 2019-05-09 23:09:38 +00:00
Treehugger Robot fc9ad309ca Merge "crash_dump: populate uid field." 2019-05-09 22:54:25 +00:00
Xin Li dbb6eb6195 Merge "DO NOT MERGE - Merge Pie Bonito/Sargo into master." 2019-05-09 22:05:44 +00:00
Elliott Hughes 5ddf3727fb Merge "libziparchive: start moving to a non-ZipString StartIteration API."
am: 05b9448ff7

Change-Id: I0cd47681935fc831e844ceb5ab99cb049364b6cf
2019-05-09 14:55:36 -07:00
Elliott Hughes 05b9448ff7 Merge "libziparchive: start moving to a non-ZipString StartIteration API." 2019-05-09 21:32:52 +00:00
Josh Gao 5df504c5f8 crash_dump: populate uid field.
Bug: http://b/132359035
Test: manual
Change-Id: I99d8446024fc2d9395132dea45f03317976a9b62
2019-05-09 12:49:57 -07:00
Jiyong Park f43a5e4a80 Merge "Refactor public_libraries.cpp more"
am: d662792de5

Change-Id: I99a2b357ca2cb15d87c32f0c571c6682be1ea365
2019-05-09 11:20:26 -07:00
Treehugger Robot d662792de5 Merge "Refactor public_libraries.cpp more" 2019-05-09 18:05:16 +00:00
Xin Li 3a95be9a7f DO NOT MERGE - Merge Pie Bonito/Sargo into master.
Bug: 131756210
Change-Id: Icec65ff6f3ddb05b10ae62d7588422c0f8950190
2019-05-09 09:27:06 -07:00
Jiyong Park 4b5a37c8bd Refactor public_libraries.cpp more
- *_public_libraries() are now thread-safe
- removed some of the duplicated code

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: I34b5149f75e28bb892cffe8fd9070be886d2f9bd
2019-05-10 00:12:03 +09:00
Bowgo Tsai d9516f42dc Merge "fs_mgr_remount: fix a typo"
am: 43f49694a5

Change-Id: Ic4345f1c4653cb6e0315b14eaf0660801fb1df5a
2019-05-09 02:21:28 -07:00
Treehugger Robot 43f49694a5 Merge "fs_mgr_remount: fix a typo" 2019-05-09 09:14:35 +00:00
Vic Yang a1be8d39b1 Merge "Static link libjsoncpp in libprocessgroup"
am: 7608ed6047

Change-Id: I1a9d9f6d1d660470dd331fcb27adfea0354b3590
2019-05-09 02:10:12 -07:00
Treehugger Robot 7608ed6047 Merge "Static link libjsoncpp in libprocessgroup" 2019-05-09 08:59:05 +00:00
Bowgo Tsai 2badf73b99 fs_mgr_remount: fix a typo
Replacing "ro.boot.vbmeta.devices_state" with
"ro.boot.vbmeta.device_state" to check if the device is locked.

Bug: 132224452
Test: tree hugger
Change-Id: If4f312730cc82ad5a5d5104a7aca8b9691cf6600
2019-05-09 13:19:29 +08:00
Vic Yang d167cb2958 Static link libjsoncpp in libprocessgroup
The majority of libjsoncpp use is due to libprocessgroup.  Static
linking reduces relocations required at runtime as well as compacts the
pages dirtied by relocations.  On a 32-bit system, where this matters
the most, this reduces 8KB of dirty pages per libprocessgroup load.
Overall, the dirty page reduction on 32-bit cuttlefish is ~500KB.

Bug: 132275636
Test: Boot on cuttlefish.  Calculate total amount of dirty memory used
      for libprocessgroup and libjsoncpp.
Change-Id: I1135bb45a3764f96a4a3a47c98fbcdee3913c988
(cherry picked from commit b562e68503)
2019-05-08 20:29:44 -07:00
Mark Salyzyn 41e53e58bf Merge "init: move "started at" environment var names to headers"
am: 72fe284022

Change-Id: Iab0cdb53053b628821acb1f8f5a24ee04c8f3aaf
2019-05-08 19:01:35 -07:00
Treehugger Robot 72fe284022 Merge "init: move "started at" environment var names to headers" 2019-05-09 00:10:40 +00:00
Mark Salyzyn 44505ecdd9 init: move "started at" environment var names to headers
Move "FIRST_STAGE_STARTED_AT" to env_first_stage_started_at variable
in first_stage_init.h.  Move "SELINUX_STARTED_AT" to
env_selinux_started_at variable in selinux.h.

Test: build
Bug: 124491153
Bug: 129780532
Change-Id: I512d1835dcee5a3d034ac453b27b0709eed23cff
2019-05-08 13:50:21 -07:00
Mark Salyzyn d8cddff7b8 Merge "init: ro.boottime.init.first_stage"
am: a6e6c7d966

Change-Id: Ib622f2277a1f38df31e3a3cd1ae08d699abf3475
2019-05-08 11:53:10 -07:00
Treehugger Robot a6e6c7d966 Merge "init: ro.boottime.init.first_stage" 2019-05-08 18:33:29 +00:00
Elliott Hughes a22ac0f07e libziparchive: start moving to a non-ZipString StartIteration API.
Same issue as with FindEntry: using ZipString in the API forces all
callers to make sure they don't hit the ZipString length limits. Switch
to std::string_view and uniformly use the empty string as a way to
signal no prefix/suffix rather than nullptr.

Also use default arguments to make the common case of no prefix and no
suffix more convenient.

Also just use std::string to increase the lifetime of the provided
prefix/suffix rather than manual memory management.

Bug: http://b/129068177
Test: treehugger
Change-Id: I6675e39ce62fadd766386d77d27423013c17d6f7
2019-05-08 11:00:32 -07:00
Elliott Hughes 7ed43aafb1 Merge "libziparchive: remove now-unused FindEntry overload."
am: 1d5745fb40

Change-Id: Iddcecbcdb424990dbac84da6e7e33d9c804ec2c9
2019-05-08 10:24:25 -07:00
Elliott Hughes 1d5745fb40 Merge "libziparchive: remove now-unused FindEntry overload." 2019-05-08 17:05:46 +00:00
Mark Salyzyn 10377df9f8 init: ro.boottime.init.first_stage
Add a property ro.boottime.init.first_stage to provide us a
first stage init duration from start to exec completed in
nanoseconds.

For consistency, report nanoseconds duration for
ro.boottime.init.selinux as well instead of milliseconds.
Now also report consistently from start to exec completed
instead of just the selinux load time.

SideEffects: ro.boottime.init.selinux is reported to TRON and
             may alarm with the millionfold increase in precision.
             ro.boottime.init is now also consistent with ns
             precision.

Test: inspect
Bug: 124491153
Bug: 129780532
Change-Id: Iff4f1a3a1ab7ff0a309c278724c92da0832b9a69
2019-05-08 16:07:10 +00:00
Tom Cherry ede9bb5b37 Merge "Add default executable permission in odm/bin"
am: 766e878253

Change-Id: I67b77e770a029a7e45389b5c8078e529043a1123
2019-05-08 08:50:55 -07:00
Tom Cherry 766e878253 Merge "Add default executable permission in odm/bin" 2019-05-08 15:31:28 +00:00
Jiyong Park 196565d8de Merge changes I43be5550,Ic40da64f,If8241959
am: 3e182b6170

Change-Id: If89b1afdf612b5ea3605ec724dca86f123dc54b3
2019-05-08 05:38:27 -07:00
Jiyong Park 3e182b6170 Merge changes I43be5550,Ic40da64f,If8241959
* changes:
  Refactor public_libraries.*
  Introduce utils.h
  Move public libraries list to a separate source file
2019-05-08 12:24:59 +00:00
Tom Cherry c6c4fbe805 Merge "Remove sbin from fs_config.cpp"
am: 26ec31ce8d

Change-Id: Idab86185136877bd50f61eab1f478cbb4daf92b1
2019-05-07 23:48:23 -07:00
Treehugger Robot 26ec31ce8d Merge "Remove sbin from fs_config.cpp" 2019-05-08 06:23:30 +00:00
Jiyong Park 5b8b306b42 Refactor public_libraries.*
- shorten the long const variables
- merge {oem|product}_public_libraries into extended_public_libraries

Bug: 130388701
Test: build & pass presubmit tests

Change-Id: I43be555041466118f2b2d188f5da3ff0d8ed7d8d
2019-05-08 13:51:43 +09:00
Jiyong Park f8802e5f0a Introduce utils.h
Introduce utils.h to have common routines.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: Ic40da64fefc1f2216bdea9ea93a15e5abb8f23a4
2019-05-08 13:49:49 +09:00
Jiyong Park 40a6077244 Move public libraries list to a separate source file
Functions for reading the public libraries list are moved out of
library_namespace.cpp to public_libraries.cpp.

In addition, library-local symbols are moved from android namespace to
android::nativeloader namespace.

Bug: 130388701
Test: build & pass presubmit tests
Change-Id: If82419598304d56d29bfec4ef553443c788d0f53
2019-05-08 13:49:42 +09:00
Dimitry Ivanov afc369a469 Merge "Enable native_bridge_support"
am: 9a45f8ff4c

Change-Id: Ib04ee55d8fa37821b45aa1c28c204cf2594f8f40
2019-05-07 15:14:20 -07:00
Dimitry Ivanov 9a45f8ff4c Merge "Enable native_bridge_support" 2019-05-07 21:47:41 +00:00
Iris Chang d257f642df Merge "Support booting a chained boot-debug.img"
am: eabbfb9e81

Change-Id: I53946ed060f6060c7b5eb02602e33bd8764052f1
2019-05-07 10:47:03 -07:00
Treehugger Robot eabbfb9e81 Merge "Support booting a chained boot-debug.img" 2019-05-07 17:27:22 +00:00
Tom Cherry 2f74a26a2d Remove sbin from fs_config.cpp
There is no longer a /sbin on Android.

Bug: 73660730
Test: build
Change-Id: I3f5ce292790392a02aa4a1c661f44b4c7e1570dc
2019-05-07 10:21:05 -07:00
Elliott Hughes a5ff19e7e9 libziparchive: remove now-unused FindEntry overload.
Bug: http://b/129068177
Test: treehugger
Change-Id: I53da90bb61b0299aca545f9a1420f64e3f909657
2019-05-07 09:27:59 -07:00
Lorenzo Colitti c3d70146b4 Merge "Enable clang-tidy for libsysutils."
am: 799ddc9c19

Change-Id: I786432de83a3ab8713ec6b8e6c7466fdd8d237ac
2019-05-07 08:42:35 -07:00
Treehugger Robot 799ddc9c19 Merge "Enable clang-tidy for libsysutils." 2019-05-07 15:31:22 +00:00
Iris Chang 705fd7f52c Support booting a chained boot-debug.img
boot-debug.img is introduced to allow 'adb root' if the device is
unlocked, and it cannot be release signed. If /boot partition is chained
in AVB signing and boot-debug.img is used, avb_slot_verify() in
userspace will return AVB_SLOT_VERIFY_RESULT_ERROR_PUBLIC_KEY_REJECTED
and fs_mgr will refuse to boot. This CL treats the public key rejection
as non-fatal for chained vbmeta to continue booting, if the device is
unlocked.

Bug: 129508966
Test: can root with user load which /boot chained in AVB signing
Change-Id: Idfa8caffbb96f33702b1749afd2e2a59616ddba7
2019-05-07 09:26:49 +00:00
Rick Yiu c78c3be5cf Merge "Apply initial settings for blkio cgroup"
am: 9243da9008

Change-Id: I2aaa9a9f3267e6e57c44967144de2a4a8d76126c
2019-05-07 01:27:59 -07:00
Treehugger Robot 9243da9008 Merge "Apply initial settings for blkio cgroup" 2019-05-07 08:15:35 +00:00
Martijn Coenen 741fef7395 Merge "Support for stopping/starting post-data-mount class subsets."
am: fc78be2935

Change-Id: I3dad9a80217cc2d33576be4d681168566d991c77
2019-05-06 23:57:02 -07:00