Commit graph

75545 commits

Author SHA1 Message Date
Florian Mayer
378969f949 Add hwasan presubmit for debuggerd.
Change-Id: Ic6b27b89470f4e8fb21dd29f8a8f486b528bdedc
2022-04-18 20:27:52 +00:00
Jiyong Park
d762a26dbe Merge changes from topic "task_profile_crosvm" am: 5590e1152e
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059550

Change-Id: I1c69f253f6f7832f514a31b7a7ecc346386899cb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 17:02:45 +00:00
Jiyong Park
99f78c0437 /dev/[kvm|vhost-vsock] are owned by system am: 5b178328a3
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059549

Change-Id: I11440a00ebc38acad137d8dbdd6175ed9c19b50a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 17:02:41 +00:00
Jiyong Park
5590e1152e Merge changes from topic "task_profile_crosvm"
* changes:
  Virtualizationservice is owned by the system UID
  /dev/[kvm|vhost-vsock] are owned by system
2022-04-18 16:38:29 +00:00
Bowgo Tsai
3e98167a22 Merge "fs_mgr: Don't assume partitions replaced by DSU are logical already" am: 243df2d917
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2063859

Change-Id: Iebf66e723b063cc84a62ea35667792a0a282205c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 10:04:23 +00:00
Bowgo Tsai
243df2d917 Merge "fs_mgr: Don't assume partitions replaced by DSU are logical already" 2022-04-18 09:39:25 +00:00
Tim Zimmermann
496132bc99 fs_mgr: Don't assume partitions replaced by DSU are logical already
Test: Boot DSU on a device without dynamic partitions but first_stage_mount for /system

Change-Id: I07f0f40037109aaaf1bce0151d1eac26c971ba9e
2022-04-17 08:22:34 +02:00
Akilesh Kailash
d2611d1c1c Merge "libsnapshot: Remove invalid snapshot metadata" am: e3cca4a0d1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2061835

Change-Id: I028ad0c82fab0af9327682b1a245a3c23805401a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 23:39:23 +00:00
Akilesh Kailash
e3cca4a0d1 Merge "libsnapshot: Remove invalid snapshot metadata" 2022-04-16 22:55:56 +00:00
Akilesh Kailash
f86fca236f libsnapshot: Remove invalid snapshot metadata
If there are snapshot metadata persisting in /metadata/ota/snapshots,
remove them before applying a new update. Make sure that
the snapshots are indeed invalid before removing them.

On a sidenote, add a comment in init.cpp related to
b/223076262.

Bug: 228250473
Test: 1: Apply OTA in recovery through adb sideload
2: Reboot
3: Apply OTA OTA again through update_device.py
4: Re-run Full OTA updates just from update_device.py

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I116bbafae09042b9c391ccd58c102704571c214e
2022-04-16 16:43:35 +00:00
Florian Mayer
c698df72a0 Merge "Skip debuggerd tests that do not apply to HWASan." am: 4691a163c1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2065788

Change-Id: I574ed3367d9d68170cda92b44d12148dd1dacecf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 06:22:32 +00:00
Florian Mayer
4691a163c1 Merge "Skip debuggerd tests that do not apply to HWASan." 2022-04-16 06:03:38 +00:00
David Anderson
459874ffe6 Merge changes I16bd2d5e,I04e9bf73 am: 6776e645f1
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059067

Change-Id: Ia5f4f45d098bb452c969793c21c5dfa781aff748
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 05:56:01 +00:00
David Anderson
c49a090bad DO NOT MERGE: Revert "init: Add more diagnostics for signalfd hangs." am: e966e6e75f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059067

Change-Id: Ie185369b739ab1c39d2cdaac13272ac4b28ba76a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 05:55:59 +00:00
David Anderson
6776e645f1 Merge changes I16bd2d5e,I04e9bf73
* changes:
  DO NOT MERGE: Revert "init: Add more diagnostics for signalfd hangs."
  DO NOT MERGE: Revert "init: Add diagnostics for signalfd epoll failures."
2022-04-16 05:32:58 +00:00
Florian Mayer
b4979293b3 Skip debuggerd tests that do not apply to HWASan.
Change-Id: Ieab61dc61e11c3e55f116a45c37ceb805a6212e0
2022-04-15 15:41:59 -07:00
David Anderson
e966e6e75f DO NOT MERGE: Revert "init: Add more diagnostics for signalfd hangs."
This reverts commit 14f9c15e05.

Reason for revert: Diagnostics no longer needed

Change-Id: I16bd2d5e54f5e1b867712453a5563acc436d88e9
2022-04-15 01:00:51 +00:00
David Anderson
fc90774ef2 DO NOT MERGE: Revert "init: Add diagnostics for signalfd epoll failures."
This reverts commit 0fa7c40c4c.

Reason for revert: Diagnostics no longer needed

Change-Id: I04e9bf73b89411f7092348f57bfe6eb7dfaa9fcb
2022-04-15 01:00:27 +00:00
Treehugger Robot
b50e5779b5 Merge "c wrapper for SetProcessProfiles" am: b18826fc3b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059548

Change-Id: I0fa913c52cbaae8e741912f09f310da237e79324
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 17:38:59 +00:00
Treehugger Robot
b18826fc3b Merge "c wrapper for SetProcessProfiles" 2022-04-14 16:52:42 +00:00
Jiyong Park
5b178328a3 /dev/[kvm|vhost-vsock] are owned by system
/dev/kvm and /dev/vhost-vsock are used by crosvm. Previously, it ran as
a custom UID `virtualizationservice`. However, this prevented us from
applying task profiles to the crosvm process because joining a process
to a cgroup requires system UID.

Now, crosvm (and its parent virtualizationservice as well) runs in
system UID. Therefore, the ownership of two device files are also
updated accorgly.

BUG=b:216788146
BUG=b:223790172
Test: watch TH

Change-Id: I1f63a12532d3a2cb5724291dbbb40210bd7c9203
2022-04-15 00:05:38 +09:00
Jiyong Park
93c66bbd89 Virtualizationservice is owned by the system UID
Previously, virtualizationservice had its own UID
`virtualizationservice`. As a result, crosvm, which is spawed by
virtualizationservice`, also run as the UID. However, that prevented us
from applying task profiles to the crosvm process because joining a
process to a cgroup requires system UID.

To fix that, virtualizationservice now runs as system UID. As a result,
this directory that virtualizationservice accesses has to change its
owner and group to system.

Bug: 223790172
Bug: 216788146
Test: watch TH

Change-Id: I2bdf49e99f1841bf77ff046b0c2455064b174e0a
2022-04-15 00:05:38 +09:00
Jiyong Park
8bf5940012 c wrapper for SetProcessProfiles
The wrapper is to call SetProcessFiles (C++ API) from crosvm via FFI.

Bug: 223790172
Bug: 216788146
Test: m

Change-Id: If342ca0d19deb1cb7ee581bba2cc543385199cbe
2022-04-15 00:05:34 +09:00
Inseob Kim
6e70fe6d23 Merge "Reland "libprocessgroup: return false on failure"" am: 9c822b55e0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2063432

Change-Id: Iafb9f424d665c9b5b17e0891f958d49062540753
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 04:32:47 +00:00
Inseob Kim
9c822b55e0 Merge "Reland "libprocessgroup: return false on failure"" 2022-04-14 03:44:37 +00:00
Christopher Ferris
5e0b5251ad Merge "Add two new crash commands." am: 707deba65b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2063434

Change-Id: Ieea0ab7a33c494bf011999f5cf584b8db63ff79c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 01:33:25 +00:00
Christopher Ferris
707deba65b Merge "Add two new crash commands." 2022-04-14 01:11:11 +00:00
Christopher Ferris
4f600fe073 Add two new crash commands.
One is intentionally seeting the abort message. The other is to set
the abort message to null.

Also, make the libseccomp_policy static so that the crasher
executable can be copied to the system afterwards without
requiring libseccomp_policy.so.

Test: Ran both new crash commands on device.
Test: Ran the seccomp crash command to verify seccomp still works.
Change-Id: I255b5f37e6eb188719e5b72302ca3f5911c8d821
2022-04-13 16:38:16 -07:00
Inseob Kim
538fc1fab1 Reland "libprocessgroup: return false on failure"
This reverts commit c109b13b5a.

Reason for revert: uploading with a CL fixing the broken test

Change-Id: I97a0a49ded8bc17c2d70c82f8e48fce09e49b2bd
2022-04-13 18:50:12 +00:00
Jiyong Park
cfad863a9f Merge "Revert "libprocessgroup: return false on failure"" am: a2b180ab64
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2061121

Change-Id: I2af7c348c7ebbe07337f92ed514c1b444affc993
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 19:55:27 +00:00
Thurston Dang
aca44e9081 Merge "[trusty][apploader] Handle APPLOADER_ERR_POLICY_VIOLATION" am: b37b47df01
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2056827

Change-Id: Ifd5102f3dc4b236589bb936e568ee522b42271a0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 19:55:15 +00:00
Jiyong Park
a2b180ab64 Merge "Revert "libprocessgroup: return false on failure"" 2022-04-12 19:50:54 +00:00
Jiyong Park
c109b13b5a Revert "libprocessgroup: return false on failure"
This reverts commit 9818f95c9e.

Reason for revert: broke some tests. b/228910109

Change-Id: I2d5f837969e433b765de89d899fc172ceeef27a6
2022-04-12 19:48:04 +00:00
Thurston Dang
b37b47df01 Merge "[trusty][apploader] Handle APPLOADER_ERR_POLICY_VIOLATION" 2022-04-12 19:21:05 +00:00
Steven Moreland
d94c71f4fb Merge "Mark libutilscallstack min sdk version." am: f5ca027819
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2061788

Change-Id: I2031bc6ecf40d9e1d448dc2078d5760bca1958c2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 18:07:36 +00:00
Steven Moreland
f5ca027819 Merge "Mark libutilscallstack min sdk version." 2022-04-12 17:41:41 +00:00
Kalesh Singh
7411bfab4e Merge "Set Multi-Gen LRU enabled based on experiment prop" am: cb965e093c
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2056840

Change-Id: I5b8e03541e12d998c38a6ec1e5ab28325dc29f8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 14:04:11 +00:00
Kalesh Singh
cb965e093c Merge "Set Multi-Gen LRU enabled based on experiment prop" 2022-04-12 13:48:48 +00:00
Steven Moreland
6c509ca3c3 Mark libutilscallstack min sdk version.
Mark this as 29 for easy inclusion in APEXes when debugging. Make
sure we don't introduce calls to things here which would prevent
this from being used on old platforms.

Fixes: 228561718
Test: build
Change-Id: I2574455dbfe681117e4afcf6eef3546be51393fa
2022-04-11 22:30:07 +00:00
Jiyong Park
b3e5d4edca Merge "libprocessgroup: return false on failure" am: 64f953e287
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059547

Change-Id: Ia13c2b23e5d3c10fbcbe6e0758ed9d6e97209cd6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 21:31:11 +00:00
Jiyong Park
64f953e287 Merge "libprocessgroup: return false on failure" 2022-04-11 21:16:32 +00:00
Jiyong Park
9818f95c9e libprocessgroup: return false on failure
SetProcessProfiles and SetTaskProfiles now correctly return false on
failure.

Bug: N/A
Test: settaskprofile <some_pid> <non_existing_name>

Change-Id: I7936303e71cd073c0ba713109328b960c66bdacc
2022-04-11 01:51:23 +09:00
Treehugger Robot
321a78c9db Merge "[libtrusty-rs] Add recv variant that uses Vec<u8>" am: 086ed5584b am: 0deee32049
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2056967

Change-Id: I2db955b54ed0cfbf8d91c781402665a480ee2b4a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 23:27:08 +00:00
Treehugger Robot
0deee32049 Merge "[libtrusty-rs] Add recv variant that uses Vec<u8>" am: 086ed5584b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2056967

Change-Id: Ic1653d474409067dd3c6d6c3fcc1f35eb7db9833
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 23:05:18 +00:00
Treehugger Robot
086ed5584b Merge "[libtrusty-rs] Add recv variant that uses Vec<u8>" 2022-04-08 22:42:22 +00:00
Kalesh Singh
bd42559beb Set Multi-Gen LRU enabled based on experiment prop
Experiments can enable/disable MG-LRU using the
persist.device_config.mglru_native.lru_gen_enabled property
which will update the coresponding sysfs control to enable or
disable this feature in the kernel.

Test: adb shell device_config put mglru_native lru_gen_config [none, core, ...]
Test: verify MG RLU is enabled/disabled: cat /sys/kernel/mm/lru_gen/enabled
Bug: 227651406
Bug: 228525049
Change-Id: I0708df8c78a85359d5cb6d5b167836768029380e
2022-04-08 13:54:10 -07:00
Treehugger Robot
7fcf02ea6e Merge "Configure rustfmt for preupload hook" am: 3e22bc616b am: e1bda9112f
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2055165

Change-Id: I98bb9b374be77b15bc15ccaa3d562b61f8482a25
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 17:42:29 +00:00
Treehugger Robot
e1bda9112f Merge "Configure rustfmt for preupload hook" am: 3e22bc616b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2055165

Change-Id: I62354271e4bc5550907c0e2b4cbc006087003731
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 16:45:34 +00:00
Treehugger Robot
3e22bc616b Merge "Configure rustfmt for preupload hook" 2022-04-08 16:25:46 +00:00
Treehugger Robot
4107315eff Merge "Add jiyong@ to OWNERS." am: b5a5095bf0 am: 93e5c072fd
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059069

Change-Id: I4026c539a988e9cb51a22dc5ea6eae4a166c6077
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 05:14:48 +00:00