Commit graph

75326 commits

Author SHA1 Message Date
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
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
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
93e5c072fd Merge "Add jiyong@ to OWNERS." am: b5a5095bf0
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2059069

Change-Id: Ic0e780c1c03452c7b48d92290dcd72696366c348
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 04:57:44 +00:00
Treehugger Robot
b5a5095bf0 Merge "Add jiyong@ to OWNERS." 2022-04-08 04:23:02 +00:00
David Anderson
9f1c919115 Add jiyong@ to OWNERS.
Change-Id: Iada34671296ebb7c1dc372638c91320bad6e7166
2022-04-07 19:15:01 -07:00
Treehugger Robot
abc0227fcb Merge "[Init] Create dir for odsign metrics" am: 50e130ed73
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2022697

Change-Id: I4273de4a0c78177b1d3b155e339231b093b16ccd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 20:58:49 +00:00
Treehugger Robot
50e130ed73 Merge "[Init] Create dir for odsign metrics" 2022-04-07 20:30:41 +00:00
Treehugger Robot
66231dabac Merge "Setup tests for libtrusty-rs" am: 3153efa864
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2050796

Change-Id: I09fc662e1ddf43dcca26acb323461aea58a8cdcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 20:06:03 +00:00
Treehugger Robot
3153efa864 Merge "Setup tests for libtrusty-rs" 2022-04-07 19:45:20 +00:00
Treehugger Robot
5875cf416c Merge "Make some debuggerd libraries available in apex com.android.virt" am: c5b7488c63
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2054410

Change-Id: I6d58bc9addcf17906e8a1a42c66c412d4a57bf3c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 13:53:10 +00:00
Treehugger Robot
c5b7488c63 Merge "Make some debuggerd libraries available in apex com.android.virt" 2022-04-07 13:25:45 +00:00
Treehugger Robot
8f9a356bd1 Merge "Clean up comments/logs" am: 02360a55b7
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2057947

Change-Id: Id5dfd2d13fa70f195781784e332e755fcf95fb40
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 03:39:50 +00:00
Treehugger Robot
02360a55b7 Merge "Clean up comments/logs" 2022-04-07 03:17:38 +00:00
David LeGare
dc2d792adc [libtrusty-rs] Add recv variant that uses Vec<u8>
* Add new `recv` method that takes a `Vec<u8>` and automatically
  allocates extra buffer space and retries the read call if the buffer
  does not have enough capacity.
* Rename the existing `recv` method to `recv_no_alloc`, and update docs
  to clarify the behaviors of both methods.
* Add tests for the new `recv` method and update existing tests to use
  `recv_no_alloc` instead.

Test: tipc-test-rs -m 1024 -t echo
Bug: 226659377
Change-Id: Ic437b617751e865da119fe0c4ef8aa456a63bf3c
2022-04-06 22:40:05 +00:00
David LeGare
acd1ef731a Configure rustfmt for preupload hook
Test: N/A
Change-Id: I8f7cecfa00777983540b8fd74da9bab1753bfc01
2022-04-06 21:11:09 +00:00
David LeGare
23dedb660e Setup tests for libtrusty-rs
Test logic is based on the tests in the original tipc-test C binary,
but adapted to use the Rust unit test infrastructure to make running
tests easier.

Test: Ran the tests
Bug: 226659377
Change-Id: I998013b2f8b304299acb09d58beb49330747802a
2022-04-06 21:11:04 +00:00
Kelvin Zhang
f887e74588 Clean up comments/logs
Test: th
Change-Id: Ie63cfab7bf8d5d8e3e91695259cf62ab3ac17ee9
2022-04-06 14:02:13 -07:00
Shikha Panwar
4b91af7d24 [Init] Create dir for odsign metrics
This is required so that system_server can read/delete the file(s) in
/data/misc/odsign/metrics & report to statsd

Note the group change in odsign directory was required so that
system_server can get the execute permission to read file in the sub dir

Test: adb shell ls -l /data/misc/odsign/metrics
Bug: 202926606
Change-Id: I6dd80e05bbfb9daf4aa3e996fc22bba1de8bd2ce
2022-04-06 17:51:08 +00:00
Akilesh Kailash
f57bff7f08 Merge "libsnapshot: OTA upgrade when vendor partition is S" am: a3ab0a41f2
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2052147

Change-Id: I25154844fc8f33658313787ae98a7e5bfdf165b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 22:44:16 +00:00
Akilesh Kailash
a3ab0a41f2 Merge "libsnapshot: OTA upgrade when vendor partition is S" 2022-04-05 22:27:03 +00:00
Treehugger Robot
75f4a8723b Merge "Add libtrusty-rs" am: c942dc549a
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2050795

Change-Id: I59888f9e028328c93810fc14c929334f13c733be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 21:11:55 +00:00
Treehugger Robot
c942dc549a Merge "Add libtrusty-rs" 2022-04-05 20:54:18 +00:00
Thurston Dang
45dbdd1ef0 [trusty][apploader] Handle APPLOADER_ERR_POLICY_VIOLATION
Add a specific error message to the Android CLI tool for the
case where the policy engine (http://go/aog/2051516) disallows
loading.

Test: Load a signed app that violates the policy
Bug: 208968719
Change-Id: I2aaa218ab3a7297ea62448de49baa0bfd6b1ee52
2022-04-05 20:25:57 +00:00
Akilesh Kailash
9fc6ee050f libsnapshot: OTA upgrade when vendor partition is S
In Android S, snapuserd binary was on vendor partition.
When there is an OTA update from S -> T, it is possible
that vendor partitions are not updated. In that case,
successive OTA updates T1 -> T2 will continue to have
snapuserd from Android S as vendor partition wasn't updated
to T. All this means, we should disable user-space snapshots.

When installing OTA during runtime, check for property
ro.vendor.build.version.release_or_codename; if the property
is set to "12", then skip userspace-snapshots.

Bug: 227614163

Test: Simulate OTA test on Pixel 6 from T1 -> T2 by forcefully
setting the property to 12 and verify OTA is applied
successfully by falling back to dm-snapshot.

Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I95f29145e5cd9ffb8d03d28ae414f0037b88be90
2022-04-05 20:23:14 +00:00
Suren Baghdasaryan
34cc1ffb19 Merge "init: try converting writepid used with cgroups into task_profiles command" am: 8330095807
Original change: https://android-review.googlesource.com/c/platform/system/core/+/1740144

Change-Id: Icf112746d01517742d527d16426dc762111ee85b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 16:57:49 +00:00
Suren Baghdasaryan
8330095807 Merge "init: try converting writepid used with cgroups into task_profiles command" 2022-04-05 16:37:55 +00:00
Shikha Panwar
757f299842 Make some debuggerd libraries available in apex com.android.virt
Test: Build passed & tested the whole topic
Bug:227443903

Change-Id: I113cd1e559307e191fec405206f23e1b4ce1a5fc
2022-04-05 15:55:16 +00:00
Suren Baghdasaryan
746ede9629 init: try converting writepid used with cgroups into task_profiles command
writepid usage to add a task to a cgroup was deprecated in favor of the
task_profile command. The reason is that writepid hardcodes cgroup path
and makes it hard to change it in the future, whereas task profiles
configure cgroup paths in one centralized place and are easy to change.
Log a warning when writepid is used with cgroups and try converting it
into a task_profiles command for well-known cgroups. If conversion is
not possible the writepid operation will still be attempted to avoid
breaking existing use cases and an error will be logged.

Bug: 191283136
Test: build and boot
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ie58393468ef7d92ab0ffb41e6f339e36d21f7478
2022-04-05 01:25:46 +00:00
Treehugger Robot
f96465ea3f Merge "Add Rust wrapper for tombstoned client using cxx." am: fad82b6c15
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2041969

Change-Id: I3981648c34cf7fc318db02ac68c8077af77ff19d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 22:59:03 +00:00
Treehugger Robot
fad82b6c15 Merge "Add Rust wrapper for tombstoned client using cxx." 2022-04-04 22:38:40 +00:00
David LeGare
fd343ee2ea Add libtrusty-rs
Test: manual using tipc-test-rs
Bug: 226659377
Change-Id: I4afc24e5a602e7ca85d5c7088fecc211b71bfc66
2022-04-04 19:12:15 +00:00
TreeHugger Robot
f4d5c4771c Merge "Merge Android 12 QPR3 ab/8391262" into stage-aosp-master 2022-04-03 01:59:56 +00:00
Suren Baghdasaryan
a7cf313f2a Merge "init: Treat failure to create a process group as fatal" am: 11602701d4
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2052022

Change-Id: Iab2ccbe29a60c0217b81cc7d26f1039a06441337
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-02 20:32:42 +00:00
Suren Baghdasaryan
11602701d4 Merge "init: Treat failure to create a process group as fatal" 2022-04-02 20:11:45 +00:00