Commit graph

72832 commits

Author SHA1 Message Date
David Drysdale
a86af7c9b1 Merge "KeyMint: don't mix Binder and std shared pointers" 2021-11-01 06:35:12 +00:00
Maciej Żenczykowski
04a1bf7c0b Merge "Fix 32-bit userspace on 64-bit kernel quota2 compatibility." 2021-10-30 20:04:29 +00:00
Christopher Ferris
e88e9922d5 Merge "Update for libunwindstack shared_ptr MapInfos." 2021-10-30 01:13:53 +00:00
Colin Cross
143ba0d31c Merge "Use HOST_OUT_EXECUTABLES instead of SOONG_HOST_OUT_EXECUTABLES" 2021-10-29 22:35:55 +00:00
Tianjie Xu
f1c8904e95 Merge "Fix unittest that checks build id" 2021-10-29 22:15:35 +00:00
Tianjie
c8cf2a4155 Fix unittest that checks build id
Should check ro.build.id instead of the ro.boot.build.id. The former
is a component of the build fingerprint.

Bug: 204507710
Test: run CtsInitTestCases
Change-Id: Iee13b30b195685c2461255f946685a288f352e06
2021-10-28 21:51:43 -07:00
Christopher Ferris
c67760611c Update for libunwindstack shared_ptr MapInfos.
Bug: 120606663

Test: Unit tests pass.
Change-Id: Ieae157388e8571345ed8968a2b5c2aa34464689f
Merged-In: Ieae157388e8571345ed8968a2b5c2aa34464689f
(cherry picked from commit 853733b627)
2021-10-28 15:05:39 -07:00
David Drysdale
fcf3fc08e4 KeyMint: don't mix Binder and std shared pointers
Bug: 203871378
Test: VtsAidlKeyMintTargetTest, TreeHugger
Change-Id: I8671342939af2bbdef643be9ce81b0bb9e7ae1a9
2021-10-28 15:39:34 +01:00
Yi-Yo Chiang
6a58c59269 Merge "Fix ubsan error path found by libfstab_fuzzer" 2021-10-27 12:08:12 +00:00
Yi-Yo Chiang
fb62a719a2 Fix ubsan error path found by libfstab_fuzzer
Fix: 204255714
Bug: 204056804
Test: Rerun the fuzzer
Change-Id: Ief4cd12c414033fc0a0c2891433a16c35c7a6e79
2021-10-27 12:06:41 +00:00
Treehugger Robot
af97deddb1 Merge "Sets 'verity_update_state' in init.rc" 2021-10-27 07:23:47 +00:00
Yi-Yo Chiang
a68b83fd60 Merge "libfstab_fuzzer: Add dictionary to guide the fuzzer" 2021-10-26 20:34:47 +00:00
Treehugger Robot
8d4993316b Merge "Add a bug component for test vts_libsnapshot_test." 2021-10-26 19:15:21 +00:00
Suren Baghdasaryan
43293deffe Merge "libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset" 2021-10-26 16:23:24 +00:00
Yi-Yo Chiang
ed72e37c4a libfstab_fuzzer: Add dictionary to guide the fuzzer
This is probably an overkill, but still, add a collection of
interesting keywords that may appear in a fstab file.

Also add myself to the "CC" list of this fuzz target.

BYPASS_INCLUSIVE_LANGUAGE_REASON="slave" or MS_SLAVE is a mount flag

Bug: 204056804
Test: adb shell /data/fuzz/x86_64/libfstab_fuzzer/libfstab_fuzzer \
  -dict=/data/fuzz/x86_64/libfstab_fuzzer/fstab.dict
Change-Id: Ife55837212a711dcbeed4f00d97da0cb022c7156
2021-10-26 23:03:33 +08:00
Treehugger Robot
6aa256fdf6 Merge "Add libfstab_fuzzer that fuzzes ReadFstabFile()" 2021-10-26 07:50:24 +00:00
Yi-Yo Chiang
b398a0bc73 Add libfstab_fuzzer that fuzzes ReadFstabFile()
Just a modest initial implementation. Uses the fuzz data as the fstab
file content directly.

Bug: 204056804
Test: lunch aosp_cf_x86_64_phone-userdebug
  SANITIZE_TARGET=address m libfstab_fuzzer
  adb sync data
  adb shell /data/fuzz/x86_64/libfstab_fuzzer/libfstab_fuzzer
Change-Id: I7976a6ee124e9b5da59cfa7f4bae9699be3f1474
2021-10-26 14:22:36 +08:00
Colin Cross
8a87bdf80d Use HOST_OUT_EXECUTABLES instead of SOONG_HOST_OUT_EXECUTABLES
Soong is installing binaries directly to HOST_OUT_EXECUTABLES instead
of SOONG_HOST_OUT_EXECUTABLES, dist from the HOST_OUT_EXECUTABLES
location.

Bug: 204136549
Test: m checkbuild
Change-Id: Iee7ae8d1ed478aa2a0344fc9f54ad2c146841cb0
2021-10-25 22:41:07 -07:00
Wei Wang
3ef7c2373a Merge "init.rc: Create a new group for dex2oat" 2021-10-26 00:33:50 +00:00
Maciej Żenczykowski
28b94af1b2 Fix 32-bit userspace on 64-bit kernel quota2 compatibility.
Test: TreeHugger, manual testing of nearly identical code snippets.
Bug: 195716186
Bug: 203385942
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I42773c2b553a08919583b7932e757564b352c507
2021-10-25 16:24:49 -07:00
Suren Baghdasaryan
ec88556460 libprocessgroup: Prevent error spam when tests disable all cpus in a cpuset
UserLifecycleTests test disables all Little cores in the course of the
test, which causes attempts to add a process into /dev/cpuset/restricted
cpuset cgroup to fail with ENOSPC error code, indicating that a process
is joining a cpuset cgroup with no online cpus. Current libprocessgroup
implementation will log an error on each such occurrence, which spams
the logs and makes it hard to analyze test results. Because this
situation does not happen in production environment (we do not offline
cpus), we can prevent flooding the logs by identifying this case,
logging an appropriate error one time and ignore all later similar errors.

Bug: 158766131
Test: adb shell "echo 0 > /sys/devices/system/cpu/cpu[0-3]/online"
Test: start some apps, observe libprocessgroup errors in the logcat
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Change-Id: Ia91d8839d86787569c255481bde077be51c43d93
2021-10-25 16:18:08 -07:00
Rick Yiu
014446d702 init.rc: Create a new group for dex2oat
Create a new group for dex2oat in cpu cgroup, which is dedicated for
dex2oat processes. Also modify task profiles for this change.

Bug: 201223712
Test: dex2oat group created
Change-Id: Ic61f4b8a64d01c03549b680970805e12b9ce4fcc
2021-10-22 22:20:07 +08:00
Bowgo Tsai
5998c74d7a Sets 'verity_update_state' in init.rc
This is required since Android 12, because
CtsNativeVerifiedBootTestCases will read property
"partition.${partition}.verified.hash_alg" to
check that sha1 is not used.

Also see https://r.android.com/1546980 for more details.

Bug: 175236047
Bug: 203720638
Test: build and boot a device
Change-Id: I300265f4af9c2781d40537f391bda9eaf62c27ba
2021-10-21 21:38:22 +08:00
Treehugger Robot
c39d42ddde Merge "Added fastboot_fuzzer" 2021-10-21 01:22:51 +00:00
Marco Nelissen
3bcaa4ebbb Merge "Fix 32-bit build" 2021-10-20 17:20:38 +00:00
Marco Nelissen
3e923cd527 Fix 32-bit build
Bug: None
Test: build
Change-Id: Id1a9c2bd4526750eca9b85896d0e90eed58b8f51
2021-10-20 10:11:52 -07:00
Marco Nelissen
1e7a8bd4fa Merge "Log if keymaster IPC takes too long" 2021-10-20 16:35:50 +00:00
Marco Nelissen
08fec49a3b Log if keymaster IPC takes too long
Bug: None
Test: run with very low timeout and verify it logs
Change-Id: I2818683f65c2191518373609c6171c056de55a9a
2021-10-20 07:51:05 -07:00
Treehugger Robot
5c8f756a50 Merge "Add a aid/uid for Thread subsystem" 2021-10-19 03:49:30 +00:00
zhanglongxia
1aac0c01a6 Add a aid/uid for Thread subsystem
Bug: b/202786090
Test: Compiles
Change-Id: I168cf2630c9591df161d0e5df71be0f93bf7ce9a
2021-10-19 09:22:06 +08:00
Yiming Pan
ac84a8ded6 Add a bug component for test vts_libsnapshot_test.
Test: Tree Hugger
Bug: 143903671
Change-Id: Ifaa406f6c7a94c4eb615ddc146119c12359ad198
2021-10-18 16:30:57 -07:00
Treehugger Robot
d08b1f7787 Merge "Fix the vendor api level" 2021-10-14 05:13:04 +00:00
Justin Yun
4446a85dc5 Fix the vendor api level
ro.vendor.api_level must be the minimum of ro.product.first_api_level
and ro.board.(first_)api_level.

Bug: 202919753
Test: getprop ro.vendor.api_level
Change-Id: Ie70dd64b21c01ed8cd5e43b01095e1e0d8ff4444
2021-10-14 12:16:27 +09:00
Ayushi Khopkar
ce5c033e2b Added fastboot_fuzzer
Test: ./fastboot_fuzzer
Bug: 189053436

Change-Id: Idf9be2f86238eb2c7090402adc54bbb9c0b43582
2021-10-14 00:32:38 +00:00
Treehugger Robot
74646e8774 Merge "Versioning for apex init.rc files" 2021-10-12 19:19:05 +00:00
Thurston Dang
d2ddb2a2f5 Merge "storageproxyd: discard writes when checkpointing, if necessary" 2021-10-12 05:29:40 +00:00
Thurston Dang
7e8dab775b storageproxyd: discard writes when checkpointing, if necessary
If a checkpointing operation is in progress, discard any write operations
that are flagged as STORAGE_MSG_FLAG_PRE_COMMIT_CHECKPOINT. In tandem
with trusty-side changes that set the flag appropriately, this avoids
the awkward case where the checkpoint is rolled back, which potentially
leads to inconsistency between the data and the superblock.

Based on Stephen's CL/1845477 "Add helper to check checkpoint state of
mounts".

Test: m storageproxyd
Bug: 194313068
Change-Id: Ib6a432db1bc1b034f803b743b0d7322e3f31d814
2021-10-12 03:47:24 +00:00
Ray Essick
35ffd69db5 Versioning for apex init.rc files
Support an "init.#rc" versioning scheme for apex init files.
chooses highest # <= current system sdk.
".rc" (aka the old init.rc) is treated as sdk 0
Document these semantics in README.md

Bug: 198186200
Test: booting, lots of logcat output
Change-Id: I2d0405be73dae9bafa6f22535b29ed6b053ddbc4
2021-10-11 19:02:47 -07:00
Jim Blackler
6fd74f0a1c Merge "Revert "Delete KM1"" 2021-10-11 14:04:30 +00:00
Jim Blackler
fc6e3d3de9 Revert "Delete KM1"
Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert "Delete KM1"

Revert submission 1844016-delkm1

Reason for revert: b/202675261
Reverted Changes:
Iba996962b:Delete KM1
Ia4c5359cd:Delete KM1
Iee6ec9816:Delete KM1
I6058e4d86:Delete KM1
I8abb9c570:Delete KM1
I9c4dc5c9e:Delete KM1

Change-Id: Ic347b5f9d5e9c372f0ddb05feeeb05abe43d5873
2021-10-11 13:38:59 +00:00
Shawn Willden
132f2341f9 Merge "Delete KM1" 2021-10-09 00:46:52 +00:00
David Anderson
a5df9e5db1 Merge "Add a test for bug 198265278." 2021-10-08 19:29:16 +00:00
Akilesh Kailash
71c680226d Merge changes from topic "vabc-merge-phase-1"
* changes:
  snapuserd: Refactor buffer allocation code
  snapuserd: Implement snapshot merge
  snapuserd: Move dm-snapshot-merge related code
2021-10-08 06:45:38 +00:00
Shawn Willden
37ea3972a7 Delete KM1
Test: Build
Change-Id: Ia4c5359cdf7dfd0ae6569d21ed427fbaa2f2e169
2021-10-07 20:25:26 -06:00
Xin Li
6042b45f56 Merge "Merge Android 12" 2021-10-07 23:50:14 +00:00
Wei Wang
1132977223 Merge changes from topic "sysbg_aosp"
* changes:
  task_profiles: add ServicePerformance to legacy device policy
  libutils: use system_background for low prio tasks in framework
2021-10-07 17:54:40 +00:00
David Anderson
af09c15049 Merge "adds LO_FLAGS_AUTOCLEAR for loop device of zram backing device" 2021-10-07 15:49:18 +00:00
Akilesh Kailash
fb964a1fbe snapuserd: Refactor buffer allocation code
Since there is no change in the buffer allocation
code with respect to snapshots in user-space, refactor
it so that we have a common code base.

Bug: 193863397
Test: Build
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I3a7b3d319f6d1532b1bb63af9884b64e1346bb50
2021-10-07 07:18:45 +00:00
Akilesh Kailash
228f6a099c snapuserd: Implement snapshot merge
Implement snapshot merge in the daemon. Following
are the important changes:

1: Spin up merge thread which does merging in user-space.
2: For ordered ops (COPY and XOR), read-ahead thread is used.
3: Read-ahead thread will read a fixed set of COW ops and cache
them in memory. Furthermore data is saved in scratch space buffer
in COW device.
4: No change in scratch space buffer - default 2MB buffer is allocated.
5: Merge thread and Read-ahead thread will work in lock step for merging
ordered ops.
6: Once the ordered ops are merged, REPLACE and XOR operations are
merged.
7: If there is a crash during merge, COW header tracks the number of
operations merged. No change in this code path.
8: Merge thread requires Base device for merging as opposed to using
the source device. Hence, while initializng the merge threads,
libsnapshot will have to pass the "Base" device to the daemon. This
is the same "Base" device which is passed to dm-snapshot during
snapshot creation.

Patch does not handle any communication with dm-user yet.

Bug: 193863397
Bug: 193863280
Bug: 193862712
Test: snapuserd_test on CF
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I14aab6eaa07ac68f2a3a23516ed9ba6567a35734
2021-10-07 07:09:28 +00:00
Akilesh Kailash
46e15bd18b snapuserd: Move dm-snapshot-merge related code
Move all the snapuserd files related to dm-snapshot/dm-snapshot-merge
to a seperate directory. We will have a logical seperation
to maintain user-space merge code.

No code changes other than moving files around.

Bug: 193863397
Test: Build
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: Ide0d824bb19f9d870ec32699d0a37de0e5d6ce81
2021-10-07 07:08:45 +00:00