Commit graph

90328 commits

Author SHA1 Message Date
Treehugger Robot
5684f3e059 Merge "Avoid unnecessary allocation in VectorImpl" into main 2024-10-09 00:19:34 +00:00
Priyanka Advani (xWF)
eb34156abe Merge changes from topic "revert-3212512-XCWURMYNFC" into main
* changes:
  Revert "libprocessgroup: Remove cgroup.rc file"
  Revert "libprocessgroup: Remove dependency on libcgrouprc"
  Revert "libprocessgroup: Remove ACgroupController_getMaxActivati..."
  Revert "libprocessgroup: Combine all 3 ActivateControllers imple..."
2024-10-08 20:35:53 +00:00
Priyanka Advani (xWF)
972a2d30f8 Revert "libprocessgroup: Remove cgroup.rc file"
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I37568516e973cb940f1229d52f94b8dc801da2ab
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
691ad736bb Revert "libprocessgroup: Remove dependency on libcgrouprc"
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I15c7763467cd9f65d4b389b2d4ccaff92012f21f
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
aeca8793f5 Revert "libprocessgroup: Remove ACgroupController_getMaxActivati..."
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I0964d1300791334cdc9e98220324d934f7ba113e
2024-10-08 18:54:37 +00:00
Priyanka Advani (xWF)
0fa49253a4 Revert "libprocessgroup: Combine all 3 ActivateControllers imple..."
Revert submission 3212512

Reason for revert: Droidmonitor created revert due to b/372273614. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3212512

Change-Id: I3dadc0b7bccfe28bb067a93df2acf2c3ea0f9920
2024-10-08 18:54:40 +00:00
T.J. Mercier
90dc57cea8 Merge changes from topic "No cgroup.rc" into main
* changes:
  libprocessgroup: Combine all 3 ActivateControllers implementations into one
  libprocessgroup: Remove ACgroupController_getMaxActivationDepth
  libprocessgroup: Remove dependency on libcgrouprc
  libprocessgroup: Remove cgroup.rc file
2024-10-08 17:36:42 +00:00
Shai Barack
e0ec952bae Avoid unnecessary allocation in VectorImpl
When shrinking a vector, we might reallocate the buffer
if the current capacity is too large, or we might reuse
the existing buffer.
Never reallocate the buffer if the current capacity is
already at the minimum (i.e. we won't actually shrink by
reallocating).

Bug: 370649413
Change-Id: I665037ed2a8621a82f2b58bcc834934de0761f34
Flag: EXEMPT bugfix
Tested: see b/370649413#comment6
2024-10-08 08:36:03 +00:00
Treehugger Robot
fcbdb00558 Merge "Remove libstats*_lazy tests from MTS" into main 2024-10-08 02:13:26 +00:00
Tej Singh
42dbd2de87 Remove libstats*_lazy tests from MTS
libstatssocket_lazy_test and libstatspull_lazy_test test primaryly the
lazy libs that ship from the platform. As a result, they shouldn't be in
MTS

Bug: 363078348
Test: TH
Change-Id: Iac7e2797d9f8c432f00688a49d53aa2691a52789
2024-10-07 18:14:22 -07:00
Armelle Laine
ef0539718b Merge "trusty-ut-ctrl: Allow stream mode" into main 2024-10-07 21:28:53 +00:00
Jaegeuk Kim
7179bd1a02 Merge "fiemap_writer_test: add block truncation and sync for safety" into main 2024-10-07 17:04:08 +00:00
Jaegeuk Kim
623682af2f fiemap_writer_test: add block truncation and sync for safety
There is a delay to get inode evicted whic requires to deallocate blocks used
by the previous test. Let's secure the pinned space as much as possible.

Bug: 371822983
Change-Id: I4cc69fc61e348511bb027ca0a9dd277fffb20f7f
Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
2024-10-06 20:19:37 +00:00
Treehugger Robot
7cc50a8c29 Merge "init/epoll: clean up reorder-init-list warning" into main 2024-10-04 17:33:25 +00:00
Treehugger Robot
f348909323 Merge "Revert "init: Wait for /dev/hvc1 during ARCVM first-stage mount"" into main 2024-10-04 17:28:04 +00:00
Neill Kapron
551c6018c8 init/epoll: clean up reorder-init-list warning
This change cleans up the following build warning:

warning: ISO C++ requires field designators to be specified in
declaration order; field 'events' will be initialized after field
'handler' [-Wreorder-init-list]

Bug: none
Test: TH
Change-Id: I9fe566b452438dc9f00f782fc4435905227a60c9
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-10-04 15:57:35 +00:00
Konrad Adamczyk
8278575b91 Merge "Revert "init: Look for super partition only on a boot device"" into main 2024-10-04 06:24:26 +00:00
Jusik Chung
8d71220df2 Revert "init: Look for super partition only on a boot device"
This reverts commit 6f0ebcb526.

Reason for revert: b/371393845 boot up failure of gcar emulator

Change-Id: I15e5bea609938cf5a1e347666b9a2abb287cb086
2024-10-04 02:21:37 +00:00
Tiffany Yang
36ea62f1fd Revert "init: Wait for /dev/hvc1 during ARCVM first-stage mount"
This reverts commit b885e4ad53.

Reason for revert: No longer needed (using virtio-blk instead)

Change-Id: I667f0d4f58060e781a5e9b21c778cd568b92971a
2024-10-03 23:52:54 +00:00
T.J. Mercier
5161033f66 libprocessgroup: Combine all 3 ActivateControllers implementations into one
Remove this code duplication and use just one interface.

Bug: 349105928
Change-Id: Id8c7186d9665e9087a654f5781b7593b06349160
2024-10-03 17:01:34 +00:00
T.J. Mercier
c31c5a75c8 libprocessgroup: Remove ACgroupController_getMaxActivationDepth
This was targeted for API 36 which doesn't exist yet, so this was never
released. Now that libprocessgroup does not use the libcgrouprc
interfaces, this can be removed.

Bug: 349105928
Bug: 359609093
Change-Id: I2ea466c9e8bc54bf9178fa74b45e88f26d3e4c69
2024-10-03 17:01:34 +00:00
T.J. Mercier
9d84103bdd libprocessgroup: Remove dependency on libcgrouprc
Read cgroup descriptors ourselves instead of going through the LLNDK
interface which performs the same thing.

Bug: 349105928
Change-Id: I94625ffd0d884d619eb3449e63a305ad5e1d77e3
2024-10-03 17:01:34 +00:00
T.J. Mercier
ae4ce8ccc5 libprocessgroup: Remove cgroup.rc file
The cgroup.rc file was introduced in 192aee782 ("libprocessgroup: Add
support for task profiles") back with the initial support for task
profiles. It was intended to optimize performance associated with cgroup
operations. However over time, supporting this file led to making
libprocessgroup code more complicated (such as the cgrouprc LLNDK
interface), and the file ended up getting mmaped into nearly every
process on Android even though only a handful of them actually use it.
Replacing this file with reading and parsing of cgroup information on
demand allows us to simplify and shrink libprocessgroup, and eliminates
thousands of unused mappings without negatively affecting boot time or
other performance metrics.

Bug: 349105928
Test: Verified with memcg v2 and MaxActivationDepth 1 on Cuttlefish, Raven, and Mokey
Change-Id: Ic3f01fdf7fda89a56ab80657e1cf4573156273e6
2024-10-03 17:01:34 +00:00
Treehugger Robot
8dd9d45534 Merge "Change owner of ACPI BERT tables to system" into main 2024-10-03 14:54:40 +00:00
Rob Barnes
da77c2e1dc Change owner of ACPI BERT tables to system
Changes the owner of the following files to system:system:

* /sys/firmware/acpi/tables
* /sys/firmware/acpi/tables/BERT
* /sys/firmware/acpi/tables/data/BERT

This allows the bert_collector deamon to read these files for error reporting.

Bug: 357626966
Test: m && atest bert_collector_test

Change-Id: Iba3a169f1851566ee6fed6d41b538dae448bf811
2024-10-03 13:54:52 +00:00
Konrad Adamczyk
bd71df6e3a Merge "init: Look for super partition only on a boot device" into main 2024-10-03 09:04:53 +00:00
Arve Hjønnevåg
f29f1a2a38 trusty-ut-ctrl: Allow stream mode
When using vsock in stream mode (or any other stream mode connection)
message boundaries are not preserved, so the original messages can get
both split and merged. The TEST_MESSAGE and TEST_TEXT messages don't
have a length field which makes it imposible to support every possible
message that can be sent over a channel that preserves message
boundaries. Since the current message header types don't contain any
printable character, we assume any of these characters in a message
payload means that two messages got merged, so we split them back up.
Additionally, if we receive a message that does not start with a valid
message header, we assume it is a continuation of the previous message.

Test: trusty-ut-ctrl -D VSOCK:2:1 com.android.libctest ^Z fg
Bug: 298705967
Change-Id: I0e470a23664268f86e4defd824c47be3479c8f25
2024-10-03 04:33:38 +00:00
Daniel Zheng
4174d07b7f Merge "libsnapshot: configure num worker threads" into main 2024-10-02 19:59:02 +00:00
Treehugger Robot
1bf57e1d71 Merge "libprocessgroup: Remove schedtune support" into main 2024-10-02 17:26:11 +00:00
Daniel Zheng
a23013dd4b libsnapshot: configure num worker threads
Forward number of worker threads build configuration to snapuserd. these
are the threads that will be used to serve i/o requests to dm-user.

Bug: 361438985
Test: OTA with print logs post OTA reboot
Change-Id: Ib70a3cb8766b96232ea6f97effece041534dc922
2024-10-02 09:56:06 -07:00
T.J. Mercier
981664df08 libprocessgroup: Remove schedtune support
Schedtune was an out of tree cgroup controller present in Android
kernels up to 4.19. It was replaced with uclamp and the cpu controller.
Now that 4.19 is EOL and unsupported, and schedtune is not present in
any supported Android kernels, remove the userspace support for
schedtune.

Bug: 362504801
Change-Id: If8baaf1a616984c5dbaac1bbd03e23ad001bc29c
2024-10-02 14:47:45 +00:00
Treehugger Robot
aa56f29ff9 Merge "Replace ANDROID_VENDOR with ANDROID_VNDK in versioning" into main 2024-10-01 05:38:46 +00:00
Hans Boehm
47ec15c928 Merge "Remove unnecessary getpriority() system call" into main 2024-09-30 18:21:39 +00:00
Sandeep Dhavale
dcb13446f2 Merge "libsnapshot: Use words for xor ops" into main 2024-09-30 16:26:50 +00:00
Sandeep Dhavale
0d84909d66 libsnapshot: Use words for xor ops
Use words instead of doing xor byte-by-byte for the entire buffer.
Profiling this with unittest, I can see the xor ops is much faster.

Also handle the word size appropriately for 32bit and 64bit platforms.

simpleperf shows that ProcessXorOp() is atleast 30% faster.
Similar improvement is seen for ProcessXorData().

Test: snapuserd_test
Bug: 369905394
Change-Id: I0bd8586f7fc1bf184f19320667b8195b07f9cdf2
Signed-off-by: Sandeep Dhavale <dhavale@google.com>
2024-09-27 14:55:06 -07:00
Jan Dabros
6f0ebcb526 init: Look for super partition only on a boot device
Init code is bailing out as soon as `super` partition was
found in the system, ignoring rest of uevents.

In case given device contains multiple boot sources, `super`
partition as well as all other partitions shall be taken
from the same boot source, instead of relying on
`which uevent came first`.

Bug: 309244873, 349144493
Test: Plug secondary USB boot device to device that supports multiple
      boot sources. Select boot from USB. Device boots properly.

Signed-off-by: Jan Dabros <dabros@google.com>
Signed-off-by: Konrad Adamczyk <konrada@google.com>

Change-Id: I70eb7d4223258ec273faa523cb67ddab0b7c32a0
2024-09-27 06:43:00 +00:00
Vova Sharaienko
778ad88da6 Merge "Added ownership attribution for test targets" into main 2024-09-26 22:18:57 +00:00
Vova Sharaienko
892ef23a9e Merge "Add host support to libexpresslog" into main 2024-09-26 22:18:57 +00:00
Vova Sharaienko
78d5f7c6f5 Added ownership attribution for test targets
Flag: NONE Docs
Bug: n/a
Test: build
Ignore-AOSP-First: will cp to aosp after
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8a32d828847a989523ebee8d21d084cf1d55a605)
Merged-In: I6ca6e48ea1ec704216833c2c04177b0022e7b659
Change-Id: I6ca6e48ea1ec704216833c2c04177b0022e7b659
2024-09-26 21:12:01 +00:00
Vova Sharaienko
717b4a7187 Add host support to libexpresslog
- change to a set of build artifacts

Flag: EXEMPT Refactor

Ignore-AOSP-First: will cp to aosp after
Bug: n/a
Test: build
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1396f9d3bb43ea44aa6b0a67fe44570828f9f668)
Merged-In: I8b565a9237319da0b24fed2c802f0e03a15bcd57
Change-Id: I8b565a9237319da0b24fed2c802f0e03a15bcd57
2024-09-26 21:11:51 +00:00
Hans Boehm
1ec5290872 Remove unnecessary getpriority() system call
This was introduced for a valid reason in aosp/1224543, but that reason
was later removed. This code wasn't.

It is not worth making a system call in order to possibly avoid a second
one, which I expect is no more expensive in that, particularly easy,
case.

Test: Treehugger
Change-Id: I346f9b641c6feb791247b16fb900a4ad97e646d2
2024-09-26 12:59:37 -07:00
Treehugger Robot
0de42845ad Merge "Remove OEM_UNLOCK_PROP usage" into main 2024-09-26 15:34:05 +00:00
Treehugger Robot
038b6269b0 Merge "Use std::sync::LazyLock rather than once_cell." into main 2024-09-26 11:10:04 +00:00
Treehugger Robot
eedb53cb0c Merge "trusty: utils: trusty-ut-ctrl: fix the vendor target" into main 2024-09-25 08:34:56 +00:00
Treehugger Robot
2d78a263bd Merge "trusty: support secure storage in system-ext" into main 2024-09-25 07:54:22 +00:00
Armelle Laine
3d90ed0cea trusty: utils: trusty-ut-ctrl: fix the vendor target
Bug: 369492636
Test: trusty-ut-ctl -D <trusty device> <port-name>

Change-Id: I9d8a298941caa4e3c5a424269577580be0ba79c8
2024-09-25 07:00:51 +00:00
Armelle Laine
69f3da832f trusty: support secure storage in system-ext
Bug: 355194622
Test: CF gets booted with KeyMint TA in VM
Change-Id: I3708ac572068162ca57c0e9b287296cea73215a7
2024-09-25 06:46:54 +00:00
Priyanka Advani (xWF)
1350207265 Merge "Revert "Support vendor partition in non-debuggable pVMs"" into main 2024-09-24 21:21:38 +00:00
Pechetty Sravani (xWF)
16f94816db Revert "Support vendor partition in non-debuggable pVMs"
Revert submission 3236797-b/340506965

Reason for revert: DroidMonitor created revert due to b/366178299.

Reverted changes: /q/submissionid:3236797-b/340506965

Tracking bug: b/369390218

Change-Id: I0ec7fe89a7a0ca3a9981cd80222d03a785e9b28f
2024-09-24 18:31:49 +00:00
Treehugger Robot
bb8dbd6b07 Merge "Update struct to include far and elr on the NS side" into main 2024-09-24 10:09:53 +00:00