Commit graph

73373 commits

Author SHA1 Message Date
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
Eric Biggers
335cd1f4a3 init.rc: remove handling of vold.decrypt property changes
These triggers were specific to FDE, which is no longer supported, so
remove them.

Bug: 191796797
Change-Id: Iab4f6bd3d0fa70ff959be2c27986c101c42e29d7
2021-11-09 22:44:50 -08:00
Eric Biggers
89ba7775af fs_mgr: remove FDE-specific FS_MGR_MNTALL codes
Remove these codes, now that neither fs_mgr nor init uses them anymore.

Bug: 191796797
Change-Id: I97451ed8b83043a4035fc8cf8bfbb95ee60afd83
2021-11-09 22:44:50 -08:00
Eric Biggers
4aa4231a8e init: remove FDE workaround from load_persist_props
FDE is no longer supported, so this workaround is no longer needed.

Bug: 191796797
Change-Id: I059b07035b2158fe84e19544f03aab48de787e62
2021-11-09 22:44:50 -08:00
Eric Biggers
e5b5e376f3 init: stop handling FDE-specific fs_mgr return codes
These codes can't be returned anymore, so stop handling them.

Bug: 191796797
Change-Id: I9bffd43db7c2f43e5f749e04e84154165dec279e
2021-11-09 22:44:50 -08:00
Eric Biggers
4d0c5efac9 fs_mgr: remove crypt_footer argument from fs_mgr_do_format()
FDE is no longer supported, so there's no longer any need to ever
reserve a crypto footer.

Bug: 191796797
Change-Id: I79121188b0bcb7b00c16fda03b68b20c40c1e240
2021-11-09 22:44:50 -08:00
Eric Biggers
c953d6eb5f fs_mgr: remove FDE fields from FstabEntry
Remove the now-unused FDE fields from struct FstabEntry.

Bug: 191796797
Change-Id: Iab11a1fe86ac9d06beef68dc7e3c543f48ce0ac6
2021-11-09 22:44:50 -08:00
Eric Biggers
63fb19532c fs_mgr: remove code that handles FDE
Since Android 10, new devices have been required to use FBE instead of
FDE.  Therefore, the FDE code is no longer needed.

Bug: 191796797
Change-Id: I2f29ce5fa61c67325d6eb6cf6693787f8fa8a011
2021-11-09 22:44:50 -08:00
Eric Biggers
b662530677 fs_mgr: stop allowing the FDE fstab options
Since Android 10, new devices have been required to use FBE instead of
FDE.  Therefore, the FDE code is no longer needed.

Make fs_mgr reject fstabs where FDE is enabled.

Unfortunately, there is a quirk where the "encryptable" flag (which was
originally meant just for FDE) was overloaded to identify adoptable
storage volumes.  It appears that we have to keep supporting this use
case.  Therefore, don't reject the "encryptable" flag completely.
Instead, just reject "encryptable" when it appears without
"voldmanaged", or without "userdata" as its argument.

Here are some references for how "encryptable=userdata" is being used to
identify adoptable storage volumes:

  * https://source.android.com/devices/storage/config#adoptable_storage
  * f26c7e9b12:system/vold/main.cpp;l=269
  * f26c7e9b12:device/google/cuttlefish/shared/config/fstab.f2fs;l=17
  * f26c7e9b12:device/generic/goldfish/fstab.ranchu;l=7

[ebiggers@: modified from a WIP CL by paulcrowley@]

Bug: 191796797
Change-Id: I3c4bbbe549cc6e24607f230fad27ea0d4d35ce09
2021-11-09 22:44:50 -08:00
Janis Danisevskis
9c72fe356a Diced: Added AID for Android's dice daemon diced.
Bug: 198197213
Test: N/A
Change-Id: Idc55363272e3e5529d931a17dad8a37af665edcd
2021-11-09 16:12:21 -08:00
Suren Baghdasaryan
d48d7c8150 libprocessgroup/tools: Add settaskprofile command-line tool
Add a command-line tool to apply task profile(s) to a given thread.

Test: taskprofile $pid ProcessCapacityHigh; grep cpuset /proc/$pid/cgroup
Test: taskprofile $pid ProcessCapacityNormal; grep cpuset /proc/$pid/cgroup
Bug: 204808810
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: I1c13731f7a9a1161f36e27436ee104964aacbfd0
2021-11-09 22:35:51 +00:00
Suren Baghdasaryan
9e3ace52bb libprocessgroup: Add CgroupGetControllerFromPath API function
Add new CgroupGetControllerFromPath function to retrieve the name of the
cgroup using a file path. If the file does not belong to any cgroup, the
function returns false.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ic17a474cb25a80a3339b33ed8bc27b07af053abb
2021-11-08 21:24:33 +00:00
Yi-Yo Chiang
30fafa6b0c Merge "Make clean_scratch_files work" am: 9ac28517a3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1878089

Change-Id: I118d999328af90f2ea306ff9fc8e063b43be3ed6
2021-11-08 06:59:54 +00:00
Yi-Yo Chiang
9ac28517a3 Merge "Make clean_scratch_files work" 2021-11-08 06:43:36 +00:00
Peter Collingbourne
47d784e9f2 Add a human readable description of the tagged_addr_ctrl value to tombstones.
Change-Id: Ib9860b282cf749891e0f6ef7697669b94235c236
2021-11-05 18:59:26 -07:00
Treehugger Robot
e965e3dcb0 Merge "Remove references to nonplat sepolicy" am: d0a4e710e9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1882068

Change-Id: I8f1088db50a6bb72c0e1c713581f8c258c4c3512
2021-11-05 17:47:29 +00:00
Treehugger Robot
d0a4e710e9 Merge "Remove references to nonplat sepolicy" 2021-11-05 17:29:55 +00:00
Suren Baghdasaryan
faad760f1b Merge "llkd: Disable in userdebug builds by default" am: 5c210880eb
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1880604

Change-Id: I42bd9dce5c5cc3bc56b4ab4137b41ff10729bdff
2021-11-05 15:59:40 +00:00
Suren Baghdasaryan
5c210880eb Merge "llkd: Disable in userdebug builds by default" 2021-11-05 15:46:50 +00:00
Jeff Vander Stoep
5effda49e1 Remove references to nonplat sepolicy
"nonplat" was renamed to "vendor" in Android Pie, but was retained
here for Treble compatibility.

We're now outside of the compatbility window for these devices so
it can safely be removed.

While I'm here, improve accuracy of some comments and
in-code-documentation.

Test: build boot cuttlefish device. adb remount, modify
/system/etc/selinux/plat_sepolicy_and_mapping.sha256 to force
on-device policy compilation. reboot. Verify that device boots
without new selinux denials.

Change-Id: Ibe5c5fa1ea206c1b4d5ad8183433c332a8aaadbf
2021-11-05 09:13:26 +01:00
Treehugger Robot
8dc36d8cc5 Merge changes I060f438c,I48fbca45 am: 2aaaa01bb9
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1879728

Change-Id: I1f3fb5a576e2e0aec7b549118a48435f207e1882
2021-11-05 00:05:03 +00:00
Treehugger Robot
2aaaa01bb9 Merge changes I060f438c,I48fbca45
* changes:
  fastbootd: use O_DIRECT for write partition
  fastbootd: allow passage of flags to open partition
2021-11-04 23:51:25 +00:00
Suren Baghdasaryan
2b92541e7f llkd: Disable in userdebug builds by default
While llkd helps in discovering issues in apps which leave zombies, it
creates issues for dogfooders when apps are killed. Disable it by
default.

Bug: 202411543
Test: boot and check llkd not running
Test: `setprop ro.llk.enable true` enables llkd
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: If93bf9e981eaa3921a9da5f3160db26c4fe17e66
2021-11-04 16:21:46 -07:00
Konstantin Vyshetsky
d5f3da8dc5 fastbootd: use O_DIRECT for write partition
Direct writes for partition flashing significantly increase performance.
Use O_DIRECT flag when opening partition for flashing. Additionally use
a 4096b aligned buffer which is required for O_DIRECT.
Switch from using 8MB write buffer to 1MB write buffer, as the extra
allocation has no performance impact.

Test: flash locally and reach home screen
Bug: 205151372
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I060f438cf698d0fda1e59e35338bb5dc1cd05b51
2021-11-04 13:24:33 -07:00
Konstantin Vyshetsky
81cc119eff fastbootd: allow passage of flags to open partition
Allow caller to pass additional flags when opening a partition. Obsolete
usage of boolean read, and make previous callers use O_RDONLY instead.
Explicitly OR (O_EXCL | O_CLOEXEC | O_BINARY) to keep existing design
working as is.

Test: flash locally and reach home screen
Bug: 205151372
Signed-off-by: Konstantin Vyshetsky <vkon@google.com>
Change-Id: I48fbca459a17fcf0b0926ab339585e3bd8e31e35
2021-11-04 12:05:48 -07:00
Treehugger Robot
9c0b1f438e Merge "cutils: only support safe list iteration." am: 52a2135180
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1879198

Change-Id: Iae43baf2caa5db307536a40f1970d319ff8eb636
2021-11-04 18:11:39 +00:00
Treehugger Robot
52a2135180 Merge "cutils: only support safe list iteration." 2021-11-04 17:40:21 +00:00
Yifan Hong
cb87bd5910 Merge changes from topic "charger-vendor" am: 95e2f7ffc8
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1870961

Change-Id: I8cf7609f2e7c2101923a3c362d96fa88055fd462
2021-11-03 19:12:51 +00:00
Yifan Hong
95e2f7ffc8 Merge changes from topic "charger-vendor"
* changes:
  charger: vendor charger use resources from /vendor
  charger: make libhealthd_charger_ui vendor_available.
  libsuspend: vendor_available.
2021-11-03 18:53:33 +00:00
Elliott Hughes
6fa2e48db9 cutils: only support safe list iteration.
We've had two use-after-frees in the last month from this nonsense...

Bug: http://b/204925347
Test: treehugger
Change-Id: I5e1485253224e38ca51a7a077dbe65d19e39f817
2021-11-03 10:26:36 -07:00
Yi-Yo Chiang
cc8e0b3ace Merge "libfiemap: array boundary check for fiemap.fm_extents[]" am: ad0f69c5a6
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1878079

Change-Id: Icc9298a78a7d85e21b1e50c216696078569be388
2021-11-03 07:06:55 +00:00
Yi-Yo Chiang
ad0f69c5a6 Merge "libfiemap: array boundary check for fiemap.fm_extents[]" 2021-11-03 06:52:02 +00:00
Akilesh Kailash
a7b5ffb203 Merge "Revert "snapuserd: Add unit test for test merge code path"" am: 3a1ddf5555
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1879199

Change-Id: I571e31fd2b7bb9102e4bc2877cde906e6460c662
2021-11-03 03:36:41 +00:00
Akilesh Kailash
3a1ddf5555 Merge "Revert "snapuserd: Add unit test for test merge code path"" 2021-11-03 03:21:53 +00:00
Akilesh Kailash
7ad63b4c77 Revert "snapuserd: Add unit test for test merge code path"
This reverts commit 1cc9818642.

Reason for revert: Failing build - There is a dependency with https://r.android.com/c/1843772/3

Change-Id: Iccac56cf4c7012d8732b4338eb7055e1b2451e3b
2021-11-03 02:19:00 +00:00
Akilesh Kailash
15e9d4c1f0 Merge "snapuserd: Add unit test for test merge code path" am: 5b7d571b87
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1799090

Change-Id: I85f3393b87baa5eaa9d027165179873bec0ab930
2021-11-03 02:04:21 +00:00
Akilesh Kailash
c80040c914 Merge changes I25fb5fce,I86cffff6,I031eb1a1,Ie40633c0,I08562b89 am: 1765610fa4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1799089

Change-Id: I71b09f7f389f61390afc5bf871cad4bb1a3d7832
2021-11-03 02:03:05 +00:00
Akilesh Kailash
5b7d571b87 Merge "snapuserd: Add unit test for test merge code path" 2021-11-03 01:55:19 +00:00
Akilesh Kailash
1cc9818642 snapuserd: Add unit test for test merge code path
Most of the test cases are similar to dm-snapshot-merge.

Additional test cases have been added primarily to test
I/O's in parallel with merge.

Bug: 193863397
Test: snapuserd_test
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: If7fede1be6d678c8665e1f9369fd3c69f5d3c4df
2021-11-03 01:54:53 +00:00
Akilesh Kailash
1765610fa4 Merge changes I25fb5fce,I86cffff6,I031eb1a1,Ie40633c0,I08562b89
* changes:
  snapuserd: Sort REPLACE ops for batch merge
  snapuserd: API to query snapshot and merge status
  snapuserd: Wire up API's for Initiating and tracking Merge
  snapuserd: I/O requests which are not block aligned.
  snapuserd: Service I/O requests from dm-user
2021-11-03 01:45:03 +00:00
Yifan Hong
ac748369bb charger: vendor charger use resources from /vendor
For the vendor variant of libhealthd_mode_charger, read resources
from /vendor. The core variant continues to read resources from
/product, /system, and /res.

Test: run charger from /vendor manually
Bug: 203246116
Change-Id: Ia9df1d081a51783409b5dbd3e3d4719efc3cb6a7
2021-11-02 13:52:40 -07:00
Yifan Hong
e3ffd1bfc2 charger: make libhealthd_charger_ui vendor_available.
This is a prerequisite to move charger to vendor partition.

Because vendor domains can't read ro.charger.*, they are all assumed
to be the default value. They aren't set in the ecosystem anyway,
so it is time to deprecate them.

Test: builds
Bug: 203246116
Change-Id: I0b17e62ab3ac5a89df091333fd9f24e33bdfd49a
2021-11-02 13:52:40 -07:00
Yifan Hong
b200c60221 libsuspend: vendor_available.
This is needed by charger in vendor.

Test: builds
Bug: 203246116
Change-Id: I55c5cace9dcd7b2fd475d61234bd469428b4caac
2021-11-02 13:52:40 -07:00