Commit graph

86855 commits

Author SHA1 Message Date
Automerger Merge Worker
7fdeb917be Merge changes from topic "am-7d67da27f9ce4ecf871760ea2fa05b1c" into android14-tests-dev am: b9407709d9 -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 d5ffbdfc56 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2911926

Change-Id: I2eca2c38447252d9c3b3aff393119e298fe5a3f4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:57:31 +00:00
Edward Liaw
7bdc396b63 [automerger skipped] Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android13-tests-dev am: 966dbfec30 -s ours am: a8b93a2809 -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 d5ffbdfc56 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2911926

Change-Id: Ib6e5c6a2a727c78cfa2a92af824de8e12dbfde90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:57:28 +00:00
Automerger Merge Worker
bc49a17b24 Merge changes from topic "am-42c0dbea3ac34fc69f4fc2fd082669b3" into android13-tests-dev
* changes:
  [automerger skipped] Merge "Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556" into android12L-tests-dev am: 421a3c69ad -s ours
  [automerger skipped] Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556 am: 7a7bacd019 -s ours
2024-01-25 19:55:16 +00:00
Automerger Merge Worker
db8555c78e [automerger skipped] Merge "Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556" into android12L-tests-dev am: 421a3c69ad -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 7e5925ef02 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2913222

Change-Id: I0429bf782d2461d0c3e581b4d6b0f6335b639edc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:55:11 +00:00
Edward Liaw
5f7df5fc4a [automerger skipped] Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556 am: 7a7bacd019 -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 7e5925ef02 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2913222

Change-Id: I73173860a89228d2933ea37c75d99ac2f9c72731
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:55:06 +00:00
Automerger Merge Worker
421a3c69ad Merge "Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556" into android12L-tests-dev 2024-01-25 19:11:31 +00:00
Automerger Merge Worker
b9407709d9 Merge changes from topic "am-7d67da27f9ce4ecf871760ea2fa05b1c" into android14-tests-dev
* changes:
  [automerger skipped] Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android13-tests-dev am: 966dbfec30 -s ours
  [automerger skipped] sched_policy_test: set_sched_policy also set the cpuset policy as fallback am: 7e5925ef02 -s ours
2024-01-25 19:11:20 +00:00
Edward Liaw
7a7bacd019 Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev am: ce34e32556
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2913222

Change-Id: I4b8b44df9fc3a78fde2fe2eaa5f74063fc11efcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:11:14 +00:00
Edward Liaw
a8b93a2809 [automerger skipped] Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android13-tests-dev am: 966dbfec30 -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 d5ffbdfc56 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2911926

Change-Id: I31fc157028e6a8fb9650a00ef98b58d72680d132
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:11:13 +00:00
Edward Liaw
7b9dd3d0b7 [automerger skipped] sched_policy_test: set_sched_policy also set the cpuset policy as fallback am: 7e5925ef02 -s ours
am skip reason: Merged-In Ia77ace7513c48b1a14290c6ecc0222b46d6bf927 with SHA-1 d5ffbdfc56 is already in history

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2911926

Change-Id: Ie1e7a726d4d69ba2e021985598874e79a0e7ca33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 19:11:09 +00:00
Edward Liaw
966dbfec30 Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android13-tests-dev 2024-01-25 18:45:48 +00:00
Edward Liaw
ce34e32556 Merge "sched_policy_test: set_sched_policy also set the cpuset policy as fallback" into android12-tests-dev 2024-01-25 18:45:38 +00:00
T.J. Mercier
1c007996b3 libprocessgroup: Use pid_t consistently for TIDs
Test: m
Change-Id: I6e95870e6c5855bfe03be3be8f7a8884147bc15d
2024-01-25 16:35:30 +00:00
T.J. Mercier
d6fb2259f6 libprocessgroup: Use pid_t consistently for PIDs
Test: m
Change-Id: Ibcef6b73a8fd3088c88b822a6b33d005595488b2
2024-01-24 23:42:39 +00:00
T.J. Mercier
a757eb856e libprocessgroup: Use uid_t consistently for UIDs
Found with -Wsign-conversion.

Test: m
Change-Id: I302ce3c2ffdd533fe45e98c5c7edbb442db46ae4
2024-01-24 22:48:25 +00:00
Steven Moreland
5ae7d86c64 Merge "libutils: Looper add 'repoll'" into main 2024-01-24 19:26:26 +00:00
Kangping Dong
56cbad8cdf Merge "[Thread] create dir /dev/socket/ot-daemon" into main 2024-01-24 10:08:28 +00:00
Edward Liaw
78eca9b78c sched_policy_test: set_sched_policy also set the cpuset policy as fallback
get_sched_policy uses the cpuset policy as fallback if the cpu cgroup
is not recognized.  Pixel is currently not using the cpu cgroup for
background policy due to b/208895940.

Bug: 265852986
Bug: 287704782
Test: atest libcutils_test:libcutils_test.SchedPolicy#set_sched_policy -- --abi arm64-v8a
Signed-off-by: Edward Liaw <edliaw@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:d5ffbdfc56a7c2510a3f1bdca9fd714f30a19434)
Merged-In: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
Change-Id: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
2024-01-24 00:10:34 +00:00
Edward Liaw
7e5925ef02 sched_policy_test: set_sched_policy also set the cpuset policy as fallback
get_sched_policy uses the cpuset policy as fallback if the cpu cgroup
is not recognized.  Pixel is currently not using the cpu cgroup for
background policy due to b/208895940.

Bug: 265852986
Bug: 287704782
Test: atest libcutils_test:libcutils_test.SchedPolicy#set_sched_policy -- --abi arm64-v8a
Signed-off-by: Edward Liaw <edliaw@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:d5ffbdfc56a7c2510a3f1bdca9fd714f30a19434)
Merged-In: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
Change-Id: Ia77ace7513c48b1a14290c6ecc0222b46d6bf927
2024-01-24 00:10:23 +00:00
Steven Moreland
34a09861af libutils: Looper add 'repoll'
To help cases where kernel drivers do not
implement poll events correctly.

Bug: 316829336
Test: boot

Change-Id: Ibad16a8e8e061a5be8cede7e8680c3095d6e6f32
2024-01-23 21:51:13 +00:00
David Drysdale
7171c676c0 Secretkeeper HAL: support large messages
The TIPC channel between HAL service and TA has a max message size of
around 4K. Cope with larger messages by using fragmentation and
reassembly for all messages.

Test: VtsSecretkeeperTargetTest
Change-Id: I18cc9a9f6e6b90ab66bc3bcf1972e1a5c5112c89
2024-01-23 10:24:01 +00:00
Treehugger Robot
e7cc98f84e Merge "libfiemap: Disable loop mapping code." into main 2024-01-22 19:54:51 +00:00
Luca Stefani
794a952642 Replace lazy_static with once_cell
Using lazy_static is now discouraged as unmaintained
and once_cell is the recommended replacement.

On top of that a similar implementation found in
once_cell is being tracked for inclusion under the
`lazy_cell` feature gate [0]

[0] https://github.com/rust-lang/rust/issues/109736

Test: m
Change-Id: I21d343a38dbd25bb2d13f239f7fa3a2d7f20323e
2024-01-22 18:47:38 +01:00
Kangping Dong
236c7060cd [Thread] create dir /dev/socket/ot-daemon
ot-daemon may use multiple unix sockets so create a dir for it.

Bug: 320451788
Test: verified that ot-daemon can create socket
/dev/socket/ot-daemon/thread-wpan.sock

Change-Id: I43ccb11ed664cf0d59fc02e2efc721ed7284e2a0
2024-01-22 01:22:36 +08:00
Yu-Ting Tseng
80b2bf16c9 Merge "Add AID_UPROBESTATS and set up its config dir." into main 2024-01-20 03:59:30 +00:00
David Drysdale
9c88c9d351 Merge "Secretkeeper: add Trusty fuzzers" into main 2024-01-18 08:42:27 +00:00
David Drysdale
8867607642 Merge "Initial Secretkeeper HAL service for Trusty" into main 2024-01-18 07:34:16 +00:00
David Anderson
d7f0965761 libfiemap: Disable loop mapping code.
On devices without metadata encryption, we use loop devices rather than
device-mapper + dm-linear + FIEMAP. Devices without metadata encryption
should not exist, since libfiemap was introduced with Android R, which
requires metadata encryption.

It is possible to retrofit an Android Q device with Virtual A/B, which
is what Pixel 4 did. However those devices can only upgrade to
Android T, and they had metadata encryption anyway.

If there are any Android Q devices that retrofitted Virtual A/B in R,
didn't have metadata encryption, and need to upgrade all the way to V,
then we can recommend they make WrapUserdataIfNeeded() unconditional.

Bug: N/A
Test: fiemap_image_test, vts_libsnapshot_test
Change-Id: I7be0507527b967166676c8b136b8758f5e69ba6b
2024-01-18 01:13:50 +00:00
Treehugger Robot
d95213e7a1 Merge "tipc-test: Allow tipc tests to be run as benchmarks" into main 2024-01-17 17:58:41 +00:00
Raphael Herouart
3ae52c45ce tipc-test: Allow tipc tests to be run as benchmarks
Adding one command line parameter -B to allow tipc test to be run as benchmarks.

Bug: 314130383
Test: /data/nativetest64/vendor/tipc-test/tipc-test -t echo -r 1 -B 100
Change-Id: I5cdd643ce6e9e289033180cff433e45f77206729
2024-01-17 16:51:33 +00:00
Treehugger Robot
e746bc445b Merge "fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch dir name" into main 2024-01-17 00:41:29 +00:00
Andy Hung
4f69c22af9 Merge "debuggerd: dump frozen Java processes" into main 2024-01-16 20:11:26 +00:00
youngtaecha
63da53fdde A new folder to store OTA telephony config update
Bug: 320002105
Test: Build, checked /data/misc/telephonyconfig is system radio

Change-Id: Id8efee15594f372fa6aaf3fe9b9081a3cefe327b
2024-01-13 14:58:58 +00:00
Andy Hung
42f8cd3bf9 debuggerd: dump frozen Java processes
Test: stacks <pid>
Test: adb shell debuggerd -b <pid>
Bug: 319754740
Change-Id: Iae230ff34409bee4a325113aed65433292975427
2024-01-12 14:06:43 -08:00
David Drysdale
b1105589b7 Revert "rpc_binder: Change trusty_tipc_fuzzer to support multiple connections and messages"
This reverts commit 589c8d1e44.

Reason for revert: fuzzer crashes immediately on line 99 as vector is empty

Change-Id: I5e56a94671a43cd131c250d98f7cfae3c96f34ab
2024-01-12 16:21:11 +00:00
David Drysdale
36dfed9476 Secretkeeper: add Trusty fuzzers
Bug: 306364873
Test: initial short run of fuzzers on device, with aosp/2737933 reverted
Change-Id: I00ac6ab2678697d69a71aa3615c580c210772f20
2024-01-12 15:53:11 +00:00
Ryan Prichard
42a3f876ad trusty: clear fuzzer's extra counters directly
The FuzzerDefs.h APIs are internal to the fuzzer and aren't available
when the fuzzer is built with a custom private libc++, so remove the
ExtraCountersBegin/ExtraCountersEnd assertions and inline the array
clearing.

Bug: 175635923
Bug: 303175229
Bug: 315079422
Test: m libtrusty_fuzz_utils trusty_gatekeeper_fuzzer
Change-Id: I1ca9d9867026ff6f8e494ac6026fb1314caab7d1
2024-01-11 12:33:15 -08:00
David Drysdale
8e1c267cdf Initial Secretkeeper HAL service for Trusty
Disabled by default; enable with `export SECRETKEEPER_ENABLED=y` before
building.

Also needs the Secretkeeper TA to be present in Trusty; if the TA is
absent, the HAL service will (repeatedly) fail to connect.

Test: build, VtsSecretkeeperTargetTest
Bug: 306364873
Change-Id: I529013395d0e3afbff4a24b663088adce2a23805
2024-01-11 09:45:20 +00:00
Hsin-Yi Chen
c0c1c3d0c1 Merge "Enable header_abi_checker for libutils explicitly" into main 2024-01-11 02:00:45 +00:00
Treehugger Robot
bc645a1c47 Merge "Use libvendorsupport for vendor api level calculation" into main 2024-01-10 11:58:06 +00:00
Nikita Ioffe
44a7cadbf7 Merge "dm_test.cpp: DeleteDeviceWithTimeout asserts that unique path is deleted" into main 2024-01-10 08:32:19 +00:00
Justin Yun
6bc1bfe160 Use libvendorsupport for vendor api level calculation
Remove temporary 'vendor_api_level_of' function from init and replace
the function with the same in libvendorsupport.

Bug: 312403948
Test: getprop ro.vendor.api_level
Change-Id: I095353e602397220571e131431e7cbd1b8511fa6
Merged-In: I095353e602397220571e131431e7cbd1b8511fa6
2024-01-10 14:06:43 +09:00
Yi-Yo Chiang
dd62ec3288 fs_mgr_overlayfs: Trim surrounding "@" from the per mountpoint scratch dir name
Right now we encode the per mountpoint scratch dir name like this:
  /system -> /mnt/overlay/@system/
  /product/app -> /mnt/overlay/@product@app/

This CL changes it to:
  /system -> /mnt/overlay/system/
  /product/app -> /mnt/overlay/product@app/

This makes it so that the encoded path for top-level mountpoints (like
/system, /vendor) would have the same encoded scratch dir as before
https://r.android.com/2795755 was introduced.
With this change old first-stage-init can handle top-level remounts
correctly. However for mountpoints with '/' in them, their remount
scratch dirs would be encoded with the new format, and old
first-stage-init would ignore and not setup these during boot.

This makes the remount mechanism to function partially when running on
an old ramdisk (first-stage-init) + new system combo.
Normally we expect the init_boot ramdisk to be upgraded alongside
system.img, so this change isn't strictly needed. However there are
cases where we might want to develop new OS features on old vendor
platform, thus this change.

Bug: 306124139
Bug: 243503963
Test: adb-remount-test
Change-Id: I9b43641bb338f11c6c83888880948e4b85af14e1
2024-01-10 04:42:06 +00:00
Treehugger Robot
1eac97ca73 Merge "Mark block device as rw before encryptFstab" into main 2024-01-10 02:22:53 +00:00
Kelvin Zhang
d0139b45b8 Mark block device as rw before encryptFstab
Some testcases assume that /dev/block/by-name/userdata is writable, but
mount_with_alternatives() will mark block device as RO if mount flag
includes MS_RDONLY. Fix it by marking the block device as RW again.

Test: th
Bug: 319156415
Change-Id: Ic04acd4b6175d3f0aeea88675da44309e8df15e8
2024-01-09 17:14:07 -08:00
Treehugger Robot
951ffacc7b Merge "adb-remount-test: Only test mounts that are remounted by us" into main 2024-01-09 16:40:43 +00:00
Kangping Dong
75346e6c3f Merge "Revert "init.rc: create /data/misc/threadnetwork folder"" into main 2024-01-09 11:58:42 +00:00
Yi-Yo Chiang
fe52f39461 adb-remount-test: Only test mounts that are remounted by us
Right now we assume all RW mounts (minus /data & special FS) are
remounted by us and we apply the remount/overlayfs related checks
on them unconditionally. This would generate false positives when
a partition was RW but not remounted by us.
The test should instead check mounts that were remounted by us
(transitioned from RO to RW after adb-remount), and ignore
partitions that were already RW before running adb-remount.

Bug: 313609600
Test: adb-remount-test
Change-Id: I94e8a35775271f557790a458781657eb3b24a6f5
2024-01-09 18:15:38 +08:00
Akilesh Kailash
711a5e24fb Merge "Set taskprofile to snapshot merge thread" into main 2024-01-09 04:51:32 +00:00
Akilesh Kailash
e57ef38bb2 Set taskprofile to snapshot merge thread
Assign CPUSET_SP_BACKGROUND taskprofile to snapshot merge threads.
This will ensure that the threads will not run on big cores.

Additionally, reduce the flushing of data to 1MB after merging REPLACE ops.

No major regression observed on snashot merge time.

On Pixel 6 for incremental OTA of 500M, snapshot merge time increased
from 72 seconds to 76 seconds after this patch.

Bug: 311233916
Test: Full and incremental OTA on Pixel 6 - Verify merge threads not on big cores
Change-Id: I455afdac0b77227869d846d0c4472ea9eb34c41c
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-01-09 03:24:10 +00:00