Commit graph

73415 commits

Author SHA1 Message Date
Martin Stjernholm
b33b3ab71e Merge changes from topic "revert-1890098-KOOTTLPTTT" am: fec41dda67
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1895142

Change-Id: I8c8175967d1f90396c3495069a4f20500a629791
2021-11-17 16:45:46 +00:00
Yi-Yo Chiang
b8837396df Reland "Replace strtok_r() with C++-style android::base::Tokenize()"
android::base::Tokenize() is like android::base::Split() but ignores
empty tokens. Think strtok_r() and strsep().
C++-ify parsing code by replacing strtok_r() with Tokenize(), which
results in more concise and readable code.

Bug: 204056804
Test: atest CtsFsMgrTestCases
(cherry picked from commit 3c1b581fd5)

Change-Id: Icce8c1b5ad074421052f68fa138d90adb85cca27
2021-11-17 16:40:01 +00:00
Martin Stjernholm
fec41dda67 Merge changes from topic "revert-1890098-KOOTTLPTTT"
* changes:
  Revert "Replace strtok_r() with C++-style android::base::Tokenize()"
  Revert "Add ParseFstabFromString(), remove ReadFstabFromFp()"
2021-11-17 16:22:28 +00:00
Martin Stjernholm
867916e8b5 Revert "Replace strtok_r() with C++-style android::base::Tokenize()"
Revert submission 1890098

Reason for revert: Breaks tests, b/206740783
Reverted Changes:
I71190c735:Add ParseFstabFromString(), remove ReadFstabFromFp...
Ic1dd0eb97:Replace strtok_r() with C++-style android::base::T...

Change-Id: I1eecdc43d504385b00caec17db626eb1d623c8ef
2021-11-17 15:51:01 +00:00
Martin Stjernholm
62291bfd5c Revert "Add ParseFstabFromString(), remove ReadFstabFromFp()"
Revert submission 1890098

Reason for revert: Breaks tests, b/206740783
Reverted Changes:
I71190c735:Add ParseFstabFromString(), remove ReadFstabFromFp...
Ic1dd0eb97:Replace strtok_r() with C++-style android::base::T...

Change-Id: I1ded0217670a9bf3f2485120ee0dddf3e854a6fb
2021-11-17 15:51:01 +00:00
Alan Stokes
83c7d72809 Merge "mkdir /metadata/sepolicy" am: 82d6d124f3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1895136

Change-Id: I184c3b9df96bd25b3d40fbbc99d0a2a27e30b87d
2021-11-17 14:26:21 +00:00
Alan Stokes
82d6d124f3 Merge "mkdir /metadata/sepolicy" 2021-11-17 14:11:14 +00:00
Jeff Vander Stoep
75d0b33d0f mkdir /metadata/sepolicy
Test: make -j; launch_cvd; adb shell ls -laZ /metadata/sepolicy
Bug: 199914227
Change-Id: I005d3eee0e047da9a7f671e87a0274fedaf59447
2021-11-17 10:45:34 +00:00
Yi-Yo Chiang
9276e88b4b Merge changes I71190c73,Ic1dd0eb9 am: e2316bb11c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1890098

Change-Id: I1887a7478285f116e58de138eac3e8edb93d9757
2021-11-17 04:36:02 +00:00
Yi-Yo Chiang
e2316bb11c Merge changes I71190c73,Ic1dd0eb9
* changes:
  Add ParseFstabFromString(), remove ReadFstabFromFp()
  Replace strtok_r() with C++-style android::base::Tokenize()
2021-11-17 04:21:55 +00:00
Daniel Norman
ebaa3e5146 Revert^2 "Load persist props before starting apexd."
f106650b04

Change-Id: I8a774130d178dbf56ba23d152c82a57751de4b6b
2021-11-16 20:28:29 +00:00
Owen Kim
c6d988c60f Merge "Revert "Load persist props before starting apexd."" am: 5f77edac5b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1893460

Change-Id: I0fab789ae1701febf71995aa236615e438d64f97
2021-11-16 08:55:12 +00:00
Owen Kim
5f77edac5b Merge "Revert "Load persist props before starting apexd."" 2021-11-16 08:39:27 +00:00
Owen Kim
f106650b04 Revert "Load persist props before starting apexd."
Revert "Demonstrate multi-installed APEXes."

Revert "Adds a new prop context for choosing between multi-insta..."

Revert "Adds multi_install_skip_symbol_files field (default fals..."

Revert submission 1869814-vapex-multi-config

Bug: 206551398
Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/tests/view?invocationId=I55600009996329947&testResultId=TR93527797572038984, bug b/206551398
Reverted Changes:
I0cd9d748d:Adds multi_install_skip_symbol_files field (defaul...
I5912a18e3:Demonstrate multi-installed APEXes.
I0e6881e3a:Load persist props before starting apexd.
I932442ade:Adds a new prop context for choosing between multi...
I754ecc3f7:Allow users to choose between multi-installed vend...

Change-Id: I27a4985061b112af7d0e9b95b6d42ccd9b846471
2021-11-16 07:08:15 +00:00
Treehugger Robot
42ef1002f3 Merge "Restart media.tuner when zygote is restarted." am: 469e830cfd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1892883

Change-Id: I140df64940a1fbd599bc8cb1e67228665a672a5f
2021-11-16 06:19:10 +00:00
Treehugger Robot
469e830cfd Merge "Restart media.tuner when zygote is restarted." 2021-11-16 06:06:31 +00:00
Yi-Yo Chiang
93e910c7bb Merge "Remove std::move() around const variable" am: 833adaf250
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1890101

Change-Id: I5125796611f8cb63452d27eed1fdb4ec1d8ac3e7
2021-11-16 05:32:08 +00:00
Yi-Yo Chiang
833adaf250 Merge "Remove std::move() around const variable" 2021-11-16 05:13:59 +00:00
Hongguang
8d8d9d853a Restart media.tuner when zygote is restarted.
Bug: 206042321
Test: Kill system_server and dumpsys tv_tuner_resource_mgr
Change-Id: Icc83453ef8852a07329757fecd10e8898a9dbdcd
2021-11-16 04:51:49 +00:00
Treehugger Robot
3e8bd5879b Merge "remove 'net.qtaguid_enabled' property" am: 2df049ff26
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1888295

Change-Id: I6658bd54a94bffa38e57ccf4101bc7c209d6cddb
2021-11-16 03:47:22 +00:00
Treehugger Robot
2df049ff26 Merge "remove 'net.qtaguid_enabled' property" 2021-11-16 03:29:56 +00:00
Daniel Norman
54e1b0e149 Merge "Load persist props before starting apexd." am: b3aa2c4691
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1871746

Change-Id: Ibb1122166023900ab5773b427d454eda80a12a2c
2021-11-16 00:56:56 +00:00
Daniel Norman
b3aa2c4691 Merge "Load persist props before starting apexd." 2021-11-16 00:45:32 +00:00
Yi-Yo Chiang
c811d139aa Add ParseFstabFromString(), remove ReadFstabFromFp()
ReadFstabFromFp() have two callers right now, ReadFstabFromFile() and
ReadFstabFromDt(). ReadFstabFromFile() opens a FILE* and pass it to
ReadFstabFromFp(), and ReadFstabFromDt() wraps a std::string::c_str()
buffer in a FILE* adaptor with fmemopen().

There's no need for such adaptor, just change ReadFstabFromFp() to
accept std::string and we're good.

Bug: 204056804
Test: atest CtsFsMgrTestCases
Test: m libfstab_fuzzer
Change-Id: I71190c7356a354aa06d1be3fdc4ca76611b3896d
2021-11-15 14:27:19 +08:00
Yi-Yo Chiang
eee9fe4777 Remove std::move() around const variable
because const variable cannot be moved.

Bug: 204056804
Test: Presubmit
Change-Id: Iec13deb0f306976cfaee88da57a17f857ac35c8a
2021-11-15 13:36:02 +08:00
Eric Biggers
f14c924898 Merge "fs_mgr: allow FDE options in recovery mode" am: d0ed71dcb7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1891237

Change-Id: Ie56702ae8700975c23324b20bd5082b1c515dbfb
2021-11-12 23:46:17 +00:00
Eric Biggers
d0ed71dcb7 Merge "fs_mgr: allow FDE options in recovery mode" 2021-11-12 23:28:04 +00:00
David Anderson
2285b528de init: Add a way to class_restart only enabled services.
class_restart accidentally restarts disabled services. Changing this
behavior is risky as it could break compatibility. Instead, add an
"--only-enabled" argument to class_restart to opt-in to the new
functionality. This syntax is backward compatible, as previously only a
1-argument form was accepted.

Bug: 190065372
Bug: 198105685
Test: add a class_restart action and a disabled service, make sure
      service is not restarted.
Change-Id: Idb08779de7ac7a21e23f8b8a3276bd5a66a43299
2021-11-12 22:31:12 +00:00
Eric Biggers
9c84a7eb04 Merge "fs_mgr: allow any argument to encryptable" am: 2c74197cae
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1891235

Change-Id: Ie8e726e0c38020fe486ff3648cc06af58a95b568
2021-11-12 22:27:40 +00:00
Eric Biggers
2c74197cae Merge "fs_mgr: allow any argument to encryptable" 2021-11-12 22:05:41 +00:00
Eric Biggers
efe209352e fs_mgr: allow FDE options in recovery mode
Unfortunately, some recovery fstabs still specify the FDE options, where
they never really did anything anyway.  Allow them for now, since it
seems preferable to restrict any breakage to the case that really
matters (devices actually configured to use FDE in their main fstab).

Bug: 191796797
Bug: 206025578
Change-Id: I85e35af8f42d2aef91f08816a67a71bbf756b211
2021-11-12 13:11:46 -08:00
Eric Biggers
9e21700282 fs_mgr: allow any argument to encryptable
There are some fstab files that specify "encryptable=footer" for
adoptable storage volumes, which contradicts the documentation which
says that it should be "encryptable=userdata".  However, the argument
was previously being ignored anyway.  To avoid unnecessarily breaking
such devices, ignore the argument to "encryptable".

Note that we continue to only allow "encryptable" in combination with
"voldmanaged".  So, fstabs that use "encryptable" for FDE (rather than
for adoptable storage) should continue to be rejected.

Bug: 191796797
Change-Id: Idc4d5f9c01098f997e12be0022bea992439cec9c
2021-11-12 12:26:10 -08:00
Eric Biggers
3498f8a5ea Merge "init: remove the class_{start,reset}_post_data commands" am: e2b03b92c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1889737

Change-Id: Ia718cfad49cbd590d38a2afb7a02678c259d3d68
2021-11-12 18:57:48 +00:00
Eric Biggers
e2b03b92c1 Merge "init: remove the class_{start,reset}_post_data commands" 2021-11-12 18:43:31 +00:00
Yi-Yo Chiang
3c1b581fd5 Replace strtok_r() with C++-style android::base::Tokenize()
android::base::Tokenize() is like android::base::Split() but ignores
empty tokens. Think strtok_r() and strsep().
C++-ify parsing code by replacing strtok_r() with Tokenize(), which
results in more concise and readable code.

Bug: 204056804
Test: atest CtsFsMgrTestCases
Change-Id: Ic1dd0eb97ef9ce6786dc2bf65cdee22a40d813e7
2021-11-12 19:29:29 +08:00
Treehugger Robot
2348f13a39 Merge "Improvements to tombstone output." am: a44f269eba
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1889738

Change-Id: I23e596a4f6d661e1b3e03c1faa78ae684451762b
2021-11-12 00:32:54 +00:00
Treehugger Robot
a44f269eba Merge "Improvements to tombstone output." 2021-11-12 00:17:12 +00:00
Peter Collingbourne
773acaa18e Improvements to tombstone output.
- Use "likelihood" instead of "probability" since that has connotations
  of being less precise, and our probability ordering isn't very precise
  anyway.

- Hide the fault address with SEGV_MTEAERR because it is not available.

- Pad the fault address with leading zeroes to make it clearer which
  bits of the top byte (and any following bytes such as PAC signature
  bits) are set.

Bug: 206015287
Change-Id: I5e1e99b7f3e967c44781d8550bbd7158eb421b64
2021-11-11 15:05:47 -08:00
Eric Biggers
dd41635cef init: remove the class_{start,reset}_post_data commands
Remove the class_start_post_data and class_reset_post_data commands,
since they aren't used anymore.  They were only used on devices that
used FDE (Full Disk Encryption), via actions in rootdir/init.rc.  These
actions have been removed, since support for FDE has been removed.
There is no use case for these commands in vendor init scripts either.

Keep the mark_post_data command, since DoUserspaceReboot() uses the
post-data service flag even on non-FDE devices.

Bug: 191796797
Change-Id: Ibcd97543daa724feb610546b5fc2a0dd7f1e62e7
2021-11-11 14:36:47 -08:00
Daniel Norman
4b09b5e202 Load persist props before starting apexd.
apexd now reads persist props to select between multi-installed APEXes
for debug builds.

Bug: 199290365
Test: see https://r.android.com/1872018
Change-Id: I0e6881e3a5a3775560b580556a7de2e2da043d34
2021-11-11 19:08:51 +00:00
Maciej Żenczykowski
4321017c32 remove 'net.qtaguid_enabled' property
Bug: 161325508
Test: atest, TreeHugger
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I71248c600e520a3fb2bc40e59f7bf8daae6ad4ed
2021-11-10 15:52:38 -08:00
Eric Biggers
9558e12aac Merge changes from topic "remove-fde" am: 8879f2723f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1886761

Change-Id: I122ff08670aa923f336bf9ed14bfe6984b1633b9
2021-11-10 19:10:41 +00:00
Peter Collingbourne
05cc11ef73 Merge "Add a human readable description of the tagged_addr_ctrl value to tombstones." am: 57e19ac46e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1883336

Change-Id: Ib6fad751f875b9c6d817ef6820dd849735826abf
2021-11-10 19:10:17 +00:00
Eric Biggers
8879f2723f Merge changes from topic "remove-fde"
* changes:
  init.rc: remove handling of vold.decrypt property changes
  fs_mgr: remove FDE-specific FS_MGR_MNTALL codes
  init: remove FDE workaround from load_persist_props
  init: stop handling FDE-specific fs_mgr return codes
  fs_mgr: remove crypt_footer argument from fs_mgr_do_format()
  fs_mgr: remove FDE fields from FstabEntry
  fs_mgr: remove code that handles FDE
  fs_mgr: stop allowing the FDE fstab options
2021-11-10 19:05:05 +00:00
Peter Collingbourne
57e19ac46e Merge "Add a human readable description of the tagged_addr_ctrl value to tombstones." 2021-11-10 18:56:59 +00:00
Suren Baghdasaryan
73e1153071 Merge "libprocessgroup/tools: Add settaskprofile command-line tool" am: 8e9beea947
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1885090

Change-Id: I91ae1656920ed34d815d87a813c800df83866614
2021-11-10 17:34:50 +00:00
Suren Baghdasaryan
8e9beea947 Merge "libprocessgroup/tools: Add settaskprofile command-line tool" 2021-11-10 17:18:41 +00:00
Suren Baghdasaryan
7a477c8b5d Merge "libprocessgroup: Add CgroupGetControllerFromPath API function" am: 4a8f4548cb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1740143

Change-Id: Id3b8888160ddb3feceb013499fc784b6c61244e7
2021-11-10 16:59:12 +00:00
Suren Baghdasaryan
4a8f4548cb Merge "libprocessgroup: Add CgroupGetControllerFromPath API function" 2021-11-10 16:48:28 +00:00
Xin Li
d028c1b69d Merge sc-qpr1-dev-plus-aosp-without-vendor@7810918
Bug: 205056467
Merged-In: I44fa52308eef41e6585b13a236f36f9cebfb2db2
Change-Id: I0786e457e7ecac0cbeacd2696626351caa98893f
2021-11-10 08:06:44 +00:00