Commit graph

90391 commits

Author SHA1 Message Date
Automerger Merge Worker
7a813fd35c Merge "Merge "libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test" into android15-tests-dev am: e4ffb7a97b" into main 2024-10-29 00:12:37 +00:00
Treehugger Robot
5561704933 Merge "libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test" into android15-tests-dev am: e4ffb7a97b
Original change: https://android-review.googlesource.com/c/platform/system/core/+/3316253

Change-Id: I38b52550e194c6d5666f11cc159f264aa012aa3d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-10-29 00:12:33 +00:00
Treehugger Robot
e4ffb7a97b Merge "libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test" into android15-tests-dev 2024-10-28 23:59:07 +00:00
Daeho Jeong
d7b46e396d Merge "support f2fs device aliasing feature" into main 2024-10-28 16:19:45 +00:00
Konrad Adamczyk
0508b53f0c Merge "Revert^2 "init: Look for super partition only on a boot device"" into main 2024-10-28 06:35:07 +00:00
Treehugger Robot
a2db8b55d6 Merge "libprocessgroup: Remove ifdefery around SetTimerSlackAction::ExecuteForTask" into main 2024-10-26 04:16:35 +00:00
T.J. Mercier
96fc434b6c libprocessgroup: Remove ifdefery around SetTimerSlackAction::ExecuteForTask
This appears to have been due to the use of prctl, which apparently
caused issues for mac builds. Now that use of prctl has been removed, it
doesn't look like we need this anymore.

Fixes: 075008174 ("libprocessgroup: Remove prctl interface for setting timer slack")
Test: m
Bug: 372498744
Change-Id: I8a43951f30d7dd838591a8ba225d712742d7cd4a
2024-10-26 00:34:51 +00:00
Karuna Wadhera
813a0fe2b2 Merge "Pin KeyMint dependency to correct/specific version" into main 2024-10-25 21:54:58 +00:00
Treehugger Robot
2a278c3a2e Merge "Don't use android::base::StartsWith / EndsWith" into main 2024-10-25 20:35:23 +00:00
William McVicker
29a05161b1 Merge "Add support to update the DTB when flashing a vendor_boot ramdisk" into main 2024-10-25 17:53:25 +00:00
T.J. Mercier
9611c18aa2 Don't use android::base::StartsWith / EndsWith
These libbase functions now directly pass through to the standard
library. [1] Use the standard library directly, and eliminate this
dependency on libbase.

[1] https://r.android.com/c/platform/system/libbase/+/3315082

Change-Id: I83d79ffa2658f30ae09a7f27cedf14e62b5df41d
2024-10-25 17:20:01 +00:00
Daeho Jeong
77ee43a9fe support f2fs device aliasing feature
We can hold the storage space of one of f2fs multi-device for data
partition, while allowing the space to be used by another purpose.
f2fs will create a sequential and pinned file as a placeholder and it
can be deallocated and returned back to data partition after it is done
with using it. We can create the file, as we define the device with
"exp_alias:" tag in the fstab.

Bug: 336319772
Test: add a device with "exp_alias" tag in fstab
Change-Id: If55730cedd21ec5a40137d2eb723a97df498c9cb
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-25 14:58:38 +00:00
Will McVicker
b544df0e15 Add support to update the DTB when flashing a vendor_boot ramdisk
When updating the vendor_boot ramdisk, there may be device tree
dependencies that require updating the device tree with the new ramdisk
which contains the first stage init kernel modules. This patch adds the
support to use the `--dtb /path/to/dtb` option to update the DTB when
updating the vendor_boot ramdisk. To do so, run the command:

  fastboot flash --dtb /path/to/dtb.img \
      vendor_boot:<RAMDISK_NAME> /path/to/ramdisk

Test: fastboot_vendor_boot_img_utils_test
Test: Verifed updating the dtb with the above command on r4
Bug: 368308832
Change-Id: Iaa1867fe64054971a698497a2e3486424fed19fe
2024-10-24 15:03:36 -07:00
Treehugger Robot
e4acb47ba9 Merge "init: filter .##rc with preview SDK version" into main 2024-10-24 08:02:49 +00:00
Konrad Adamczyk
5bfb93678f Revert^2 "init: Look for super partition only on a boot device"
This reverts commit 8d71220df2.

Reason for revert: Fix for gcar emulator (basically all QEMU-based emulators) landed at aosp/3315253 and aosp/3160116.

Change-Id: If4eddd3f7e224c31019ad3bd752e2375c7567780
2024-10-24 07:28:25 +00:00
Karuna Wadhera
03f7133b0e Pin KeyMint dependency to correct/specific version
libkeymint depends on the latest version of the HAL, which will soon be
bumped to v4. Since this implementation won't immediately be upgraded,
and this dependency seems unused, remove it.

Bug: 369375199
Test: Treehugger
Change-Id: I5e952595bb4d4d8a283b286b5054576394788f16
2024-10-23 23:13:13 +00:00
Akilesh Kailash
77dc1e7df3 libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test
IsUserspaceSnapshotUpdateInProgress() would return dm partitions
which are backed by verity; this check is invalid for tests.

Bug: 369964380
Test: vts_libsnapshot_test64 --gtest_filter=SnapshotUpdateTest.MapAllSnapshotsWithoutSlotSwitch
Change-Id: I7d207c472077042ea07b65bf81b64c9c240ae8c7
Signed-off-by: Akilesh Kailash <akailash@google.com>
(cherry picked from commit 68c2cbf2be)
2024-10-23 07:11:50 +00:00
Treehugger Robot
07e913e85e Merge "Remove dependencies on the 1-variant fallback" into main 2024-10-23 03:23:18 +00:00
Cole Faust
09c18c17fd Remove dependencies on the 1-variant fallback
When adding a dependencies, if the variants don't match, but the
dependency only has 1 variant anyways, soong will always use that
variant. This makes it hard to add new variants to soong, because the
1-variant fallback stops being used and you start getting missing
variant errors. Make changes to bp files such that all dependencies
correctly specify the variant to use.

Bug: 372091092
Flag: EXEMPT refactor
Test: m nothing
Change-Id: I35a5ac0e6b63080f692be6597edf5f213c4e7acb
2024-10-22 16:33:50 -07:00
Akilesh Kailash
3aa27b095d Merge "libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test" into main 2024-10-22 19:51:49 +00:00
Akilesh Kailash
68c2cbf2be libsnapshot: Fix MapAllSnapshotsWithoutSlotSwitch test
IsUserspaceSnapshotUpdateInProgress() would return dm partitions
which are backed by verity; this check is invalid for tests.

Bug: 369964380
Test: vts_libsnapshot_test64 --gtest_filter=SnapshotUpdateTest.MapAllSnapshotsWithoutSlotSwitch
Change-Id: I7d207c472077042ea07b65bf81b64c9c240ae8c7
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-10-22 16:37:46 +00:00
T.J. Mercier
490b505a3f Merge changes from topic "reapply_no_cgroup.rc" into main
* changes:
  Reapply "libprocessgroup: Combine all 3 ActivateControllers imple..."
  Reapply "libprocessgroup: Remove ACgroupController_getMaxActivati..."
  Reapply "libprocessgroup: Remove dependency on libcgrouprc"
  Reapply "libprocessgroup: Remove cgroup.rc file"
2024-10-22 15:07:17 +00:00
Treehugger Robot
c9d8983be3 Merge "RefBase: document leak memory case" into main 2024-10-22 01:35:53 +00:00
Yihan Dong
f255ce1786 Merge "Add proposed trendy teams for VTS modules" into main 2024-10-22 00:09:17 +00:00
Steven Moreland
a190ecb6f1 RefBase: document leak memory case
We should fix the leak, but it introduces the possibility
that something is use this. Instead, document best practice
(not to allocate RefBase objects on the stack).

Fixes: 295340906
Test: N/A
Change-Id: Ife7a561f790dc687fb99b73729818e61834fa272
2024-10-21 23:18:50 +00:00
Spandan Das
b18bda3bca Merge "Mark the phony shell_and_utilities_vendor as vendor: true" into main 2024-10-21 23:08:26 +00:00
Spandan Das
5331393cb1 Mark the phony shell_and_utilities_vendor as vendor: true
As part of the make to soong conversion, we are currently autogenerating
android_filesystem soong modules for each partition (system, system_ext,
vendor, ...), with the goal to eventually substitute the kati built
partitions. In order to generate the deps of these partitions, we are
currently using a heuristic to classify the modules in
`PRODUCT_PACKAGES` with the associated partition.

Mark the phony module `shell_and_utilities_vendor` as
`vendor: true` to help with this conversion heursitic.

Bug: 374371755
Test: verified that /bin/awk is present in the autogenerated soong-built
vendor partition

Change-Id: I0a99275fb03fbb9adeb1502734759f433585ef25
2024-10-21 22:04:20 +00:00
Christopher Ferris
116a3d7b2a Merge "Remove log spam." into main 2024-10-21 21:43:29 +00:00
Suren Baghdasaryan
0bbcaa7145 Merge "Remove carlosgalo from libprocessgroup OWNERS" into main 2024-10-21 17:15:25 +00:00
T.J. Mercier
cbe09a8058 Remove carlosgalo from libprocessgroup OWNERS
Change-Id: I37cac7694491a7efe16e835776dcd8be7335eabe
2024-10-21 17:10:34 +00:00
Akilesh Kailash
c7cad438ab Merge "libsnapshot: Resume snapshot merge if snapshots are in second phase" into main 2024-10-20 06:55:24 +00:00
Akilesh Kailash
5ad59a4cff libsnapshot: Resume snapshot merge if snapshots are in second
phase

If the device reboots when SnapshotUpdateStatus switches from
first phase to second phase, then track the transition
and resume the merge.

Bug: 374225913
Test: OTA on Pixel - Verify merge resumes when device reboots just after
first phase merge
Change-Id: I5f62a03852a4b012850b11d0c1e6b96ec0556278
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-10-20 05:19:59 +00:00
Christopher Ferris
3aac36201b Remove log spam.
When dumping, the code checks if a thread is running as a guest.
If it's not, the code always logs an error message if the header
data structure cannot be read. Don't print an error message in
this case.

Test: Crash and no longer see "failed to get the guest state header"
Test: message.
Change-Id: I6971b57b218a4f653682cfdc82118dc576d9e331
2024-10-19 00:25:12 +00:00
David Anderson
097b607ac6 Merge "init: Issue a wipe on boot if trade-in mode was active." into main 2024-10-18 21:55:09 +00:00
Treehugger Robot
d7f4fbf778 Merge "Add dirgroup for trusty genrule" into main 2024-10-17 23:43:19 +00:00
Treehugger Robot
2307e47ed0 Merge "libprocessgroup: Remove SetClamps action" into main 2024-10-15 22:56:36 +00:00
Jooyung Han
a6af9bced3 init: filter .##rc with preview SDK version
On a preview device (where codename is not "REL"), filtering .##rc files
will choose the highest versions reglardless of ro.build.version.sdk.

Bug: n/a
Test: add .36rc to an apex and see if init reads it.
Change-Id: Icd63cf70e45cc14504f839ce9492e1766147a40e
2024-10-15 15:02:11 +09:00
Newton Lam
b3c9db481f Merge "Use uint64_t instead of size_t when calculating extent size to avoid overflow" into main 2024-10-15 04:18:38 +00:00
T.J. Mercier
5424402b13 Merge "libprocessgroup: Add SetSchedulerPolicy Action" into main 2024-10-15 00:02:39 +00:00
T.J. Mercier
3984611601 libprocessgroup: Add SetSchedulerPolicy Action
Add a new profile action that allows users to set a scheduler policy and
priority for a thread when a profile with the action is applied. This
can be used with the POSIX policies specified in the sched_setscheduler
man page. A priority value is required for real-time policies. A nice
value may optionally be provided for normal policies.

If a normal policy is used and a nice value is provided, it will be
applied with setpriority() after the scheduler policy is applied. The
range of nice values that can be used in the task profiles JSON in this
case is [-20, 19].

If a real-time policy is used, the range of priorities that can be used
in the task profiles JSON is [1, 99] which will be mapped onto
[sched_get_priority_min(), sched_get_priority_max()] at runtime for the
the provided policy.

Here are some examples:

Use lowest-priority with FIFO policy:
"Actions": [
  {
    "Name": "SetSchedulerPolicy",
    "Params":
    {
      "Policy": "SCHED_FIFO",
      "Priority": 1
    }
  }
]

Use highest-priority (lowest nice) with standard NORMAL scheduler:
"Actions": [
  {
    "Name": "SetSchedulerPolicy",
    "Params":
    {
      "Policy": "SCHED_OTHER",
      "Nice": -20
    }
  }
]

Bug: 368072932
BYPASS_INCLUSIVE_LANGUAGE_REASON=false positive
Change-Id: I502ceb3913016e9f4e6b6322cc0eee905c9a5c9a
2024-10-14 21:00:11 +00:00
Newton Lam
44884d5c31 Use uint64_t instead of size_t when calculating extent size to avoid overflow
Change-Id: I22a77162d08fd7e82ffaa3e0c6c8adb6e956f7d1
2024-10-14 20:52:32 +00:00
Yihan Dong
900ef7bf3a Add proposed trendy teams for VTS modules
Change-Id: I4f62c5105f51b37fe61efe3ea61a88036cfb4b96
Test: build locally
Bug: 368362374
2024-10-12 08:53:10 +00:00
T.J. Mercier
2a030efe67 libprocessgroup: Remove SetClamps action
The SetClamps profile action has always been a no-op. Remove the class
and parsing code for this action.

Bug: 372915523
Change-Id: Ic6e685aa992b83464dfb5e6446b622a57ed61db5
2024-10-11 17:08:40 +00:00
Treehugger Robot
7e0ba3af9a Merge "libprocessgroup: Remove unused prctl include" into main 2024-10-10 17:56:21 +00:00
T.J. Mercier
3e4b58e9d4 libprocessgroup: Remove unused prctl include
Fixes: 075008174 ("libprocessgroup: Remove prctl interface for setting timer slack")
Test: m
Bug: 372498744
Change-Id: Icb65d631cdc52b5f5434b33a593adf706314f66e
2024-10-10 16:25:46 +00:00
Inseob Kim
cea66e89a1 Add dirgroup for trusty genrule
Bug: 358302178
Test: m lk.elf.x86_64 lk.elf.arm64
Change-Id: Ic3e41c6a38aaa9dd87dbc4a0215c02d19b3063a0
2024-10-10 18:21:29 +09:00
Treehugger Robot
3aff5e6b0a Merge "libprocessgroup: Use pid_t for ProfileAction::ExecuteForTask" into main 2024-10-10 00:13:25 +00:00
T.J. Mercier
b53eb9dbc6 libprocessgroup: Use pid_t for ProfileAction::ExecuteForTask
This was missed in commit 1c007996b ("libprocessgroup: Use pid_t
consistently for TIDs").

Change-Id: Idefc9e7c2161ab3163bd1a0cb68b899e10e9c8ed
2024-10-09 22:47:40 +00:00
Treehugger Robot
499643e456 Merge "init: Remove schedtune support" into main 2024-10-09 20:45:29 +00:00
Treehugger Robot
cd2475ccf6 Merge "libprocessgroup: Remove prctl interface for setting timer slack" into main 2024-10-09 19:54:07 +00:00