Commit graph

90527 commits

Author SHA1 Message Date
David Drysdale
487584da23 Move Trusty C++ KeyMint to v4
- Declare v4 HAL.
- Declare version 400 in Package Manager (when unfrozen).
- Link to current (V4 when unfrozen) versions of support libraries.
- Add `setAdditionalAttestationInfo()` method to HAL service.
- Add `SetAdditionalAttestationInfo()` method to implementation, using
  the common message types.
- Add Trusty-specific message code for the
  `SET_ADDITIONAL_ATTESTATION_INFO` message exchange.

Test: VtsAidlKeyMintTargetTest (new test fails until TA updated too)
Bug: 369375199
Change-Id: I4699aea3ab8a0723a5c2bc1493f7bbb69cdfd6df
2024-11-25 15:52:31 +00:00
David Drysdale
91b97d7362 Merge "Declare support for v4 of KeyMint HAL" into main 2024-11-20 06:27:24 +00:00
Akilesh Kailash
e367550792 Merge "libprefetch: library to prefetch data using tracing." into main 2024-11-20 05:02:25 +00:00
Vikram Auradkar
ae8313f8e6 libprefetch: library to prefetch data using tracing.
1: This supports "mem" tracing only.
2: Replay option is modified to use "pread" instead
of readahead.

A simple utility binary "prefetch" is built which links to the library.

The binary allows record, replay and verifying the generated
metadata.

Bug: 362507272
Test: cargo test passes all unit tests.

Verify record, replay and dump options:

./prefetch record --duration 10 --path /data/test/trace-test
./prefetch replay --path /data/test/trace-test
./prefetch dump /data/test/trace-test --format csv

Change-Id: I1661e49183c6120d2878510e609571fe6d608bb5
Signed-off-by: Vikram Auradkar <auradkar@google.com>
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-19 17:50:49 -08:00
Akilesh Kailash
dff0420523 Merge "Move snapuserd_test to postsubmit" into main 2024-11-20 01:28:09 +00:00
Maciej Żenczykowski
5c14720b5a Merge "Revert "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"" into main 2024-11-19 20:43:39 +00:00
Treehugger Robot
8b7d0aa8c0 Merge "ueventd: add support for driver section in ueventd.rc" into main 2024-11-19 19:49:13 +00:00
Maciej Żenczykowski
932497ea1c Merge "libcutils: create rust bindings for android ids" into main 2024-11-19 19:26:49 +00:00
Maciej Żenczykowski
fdaaef9523 Revert "libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS"
This reverts commit fdf4432356.

Reason for revert: b/379796721

Change-Id: I34cdc69d5b8d11446da02106b7bd593a8c8151c3
2024-11-19 19:24:54 +00:00
Akilesh Kailash
6028880ac0 Move snapuserd_test to postsubmit
Bug: 338329603
Test: Build
Change-Id: Ibee6be732078ea7e11fe7348772837b9b2699fbf
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-19 10:27:20 -08:00
Eric Caruso
d17d5c585e ueventd: add support for driver section in ueventd.rc
Allow ueventd configuration to specify what to do with
devices based on driver. This responds to bind events and
treats them similarly to add events.

The format of the driver stanza is exactly the same as
that of the subsystem stanza.

Bug: 376900376
Test: set up cbc_mbim driver stanza and ensure it properly
  creates and destroys device nodes when a USB device with
  that driver appears and disappears or is bound and unbound

Change-Id: I31f5c91bd074d14075b74fe7beefaa6ac07a7ac9
2024-11-19 12:07:30 -05:00
Treehugger Robot
a7ce1a5975 Merge "snapuserd: Use GTEST_SKIP in snapuserd_test." into main 2024-11-19 05:01:23 +00:00
David Anderson
668ffc395d snapuserd: Use GTEST_SKIP in snapuserd_test.
The test harness treats an early exit as a failure, so use GTEST_SKIP()
instead.

Bug: 379242140
Test: vts_snapuserd_test
Change-Id: I25351bb7ebf65e6c56865662d297feb4a1f635b3
2024-11-18 19:24:29 -08:00
Neill Kapron
f1d00f0f2a libcutils: create rust bindings for android ids
For work on the new rust based bpfloader, we need access to the IDs in
android_filesystem_config.h for owner/group permissions of pinned bpf
programs and maps. Create android_ids crate to expose this
information to rust.

Bug: 359646531
Test: Manual
Change-Id: Iee827d8a80a82fbee02a76280668071713625abf
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-11-19 02:47:16 +00:00
Christopher Ferris
d7f95d9e69 Merge "Remove non-UTF8 characters from string fields." into main 2024-11-18 21:26:08 +00:00
Treehugger Robot
a747b7560a Merge "Fix typo of snapuserd_verify.h" into main 2024-11-18 20:35:08 +00:00
Treehugger Robot
569db94fa8 Merge changes Iae1cbfcc,I4466838c,I19c75e50,I2f49fab1 into main
* changes:
  libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS
  libprocessgroup: Convert CGROUPV2_HIERARCHY_NAME to std::string
  libprocessgroup: Remove CGROUPV2_CONTROLLER_NAME
  libprocessgroup: Remove CGROUPS_RC_PATH
2024-11-18 19:57:51 +00:00
Hung Nguyen
a0627e76ab Merge "Add AID for memory management daemon" into main 2024-11-18 19:41:24 +00:00
Aeric
28b2556e90 Fix typo of snapuserd_verify.h
"advisible" should be "advisable"
"fucntionality" should be "functionality"

Bug: 379603290
Test: build pass
Change-Id: I6c95f2b186f479ba51df8603ce87c0522e91bf64
2024-11-18 17:32:55 +08:00
Chan Wang
c759f23f2f Merge "Use the new 'partition' field in 'ApexInfo' to identify vendor apexes" into main 2024-11-16 11:41:00 +00:00
Christopher Ferris
6a5db68385 Remove non-UTF8 characters from string fields.
The string type in the tombstone proto does not support non-UTF8
characters. Therefore, use the oct_encode function to encode the
abort_message field and message field from LogMessage.

Fix up stl includes, add ones that were missing and remove those not
being used.

Add new unit test to verify that the abort and log messages are
sanitized.

Bug: 279496937
Bug: 377940849
Bug: 378185483

Test: All unit tests pass.
Test: Ran pbtombstone on a crash with non-UTF8 characters and verified
Test: it processes properly after this change and fails before the change.
Change-Id: I3554d56caf9fcbfc410b4d554f6c3b4888b37e28
2024-11-15 22:44:42 +00:00
Orlando Arbildo
e4414f5856 Merge "trusty: utils: rpmb_dev: add wv secure storage init.rc" into main 2024-11-15 22:26:21 +00:00
Treehugger Robot
664f16c830 Merge "snapuserd: Change error message to verbose" into main 2024-11-15 19:42:17 +00:00
Treehugger Robot
07f977220e Merge "Revert^5 "Set block device as RO/RW before mount"" into main 2024-11-15 19:30:21 +00:00
Akilesh Kailash
d02b74411b snapuserd: Change error message to verbose
These error logs gets printed even when I/O gracefully
terminates which might be confusing.

Bug: 377819507
Test: Build
Change-Id: I93d4ec2203566e75195215babc0042370be43ccb
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-15 09:54:44 -08:00
Elliott Hughes
d68632becc Merge "Stop explicitly adding bionic subdirectories to the include path." into main 2024-11-15 17:08:09 +00:00
Chan Wang
5996d608af Use the new 'partition' field in 'ApexInfo' to identify vendor apexes
A new field 'partition' was added to `ApexInfo` recently which stores
pre-installed partition information as string (e.g. 'SYSTEM') in
aosp/3335753. Using 'partition' field for Subcontext vendor apex
initialization because the existing field `preinstalledModulePath` won't
be populated for brand-new apex (a new type we introduced recently).

Bug: 377111286

Test: atest CtsInitTestCases
Change-Id: I8970b3cb5884bdb949035f5bdc5b2e18618cc9cc
2024-11-15 16:21:50 +00:00
Treehugger Robot
2c11c48434 Merge "init: Add NVME support to the boot_part_uuid method of managing boot devices" into main 2024-11-15 15:15:15 +00:00
Alice Wang
e4193a055f Merge "Rename system property to enable KeyMint VM" into main 2024-11-15 09:45:25 +00:00
T.J. Mercier
fdf4432356 libprocessgroup: Remove __BEGIN_DECLS and __END_DECLS
These macros have been useless in this file since commit 82b72a566
("libprocessgroup: Add support for task profiles") in 2018 which added
C++ includes, and C++ types and keywords inside an extern "C" block.

Change-Id: Iae1cbfcc5cb974034d88fb466b79088496190940
2024-11-14 23:04:10 +00:00
T.J. Mercier
b6071f19c3 libprocessgroup: Convert CGROUPV2_HIERARCHY_NAME to std::string
Almost everywhere CGROUPV2_HIERARCHY_NAME is used a std::string is
required, so change its type to avoid temporaries.

Change-Id: I4466838c510f2eb8212fc71999cdaa47359ce9c3
2024-11-14 22:56:11 +00:00
T.J. Mercier
9e5f74d4e4 libprocessgroup: Remove CGROUPV2_CONTROLLER_NAME
This was deprecated a year ago, and should no longer be used.

Change-Id: I19c75e50fd3cc86734fa9cc7f3d883260b2484ca
2024-11-14 22:44:33 +00:00
T.J. Mercier
148c2531ee libprocessgroup: Remove CGROUPS_RC_PATH
/dev/cgroup_info/cgroup.rc doesn't exist anymore!

Bug: 349105928
Change-Id: I2f49fab15d083f0c1617989ccf96ca843f998140
2024-11-14 22:44:33 +00:00
Douglas Anderson
dd8edea859 init: Add NVME support to the boot_part_uuid method of managing boot devices
NVME devices have a subsystem of "class/nvme". Add that to the list of
subsystems we check so we can identify them properly.

Bug: 316324155
Test: Boot on a device with nvme
Change-Id: I2ab3f6890f62f525dba150a0368c666a1c4c875e
2024-11-14 13:53:54 -08:00
Treehugger Robot
243850ca5f Merge "Fix failure in CowTest#InvalidMergeOrderTest." into main 2024-11-14 20:04:21 +00:00
Christopher Ferris
122a57630e Merge "Add source of unwind when fatal error." into main 2024-11-14 19:23:45 +00:00
David Anderson
9d06208826 Fix failure in CowTest#InvalidMergeOrderTest.
This is failing on hwasan builds due to a typo in the test method. The
actual writer logic is unaffected.

Bug: 377298650
Test: valgrind cow_api_test
Change-Id: I5c3f32ae57bf90b9fd29c7446bf34bdcb004328c
2024-11-14 10:41:07 -08:00
Treehugger Robot
de8fa774c3 Merge "libprocessgroup: Remove libcgrouprc_format" into main 2024-11-14 18:23:42 +00:00
David Drysdale
03a14f5284 Declare support for v4 of KeyMint HAL
Bug: 377744414
Bug: 369375199
Test: vts_treble_vintf_vendor_test
Change-Id: I1fc04834819cc9291d89a6ee6803cbc5d5d91437
2024-11-14 18:18:55 +00:00
Elliott Hughes
a4e852d032 Stop explicitly adding bionic subdirectories to the include path.
Change-Id: I9961fa6ac957d8613f93fa33731da797f9ba8615
2024-11-14 18:14:26 +00:00
Alice Wang
16693fae25 Rename system property to enable KeyMint VM
This allows us to regroup Widevine VM under the same trusty
group.

Bug: 368502791
Test: launch_cvd --secure_hals=guest_keymint_trusty_insecure
Test: atest VtsAidlSharedSecretTargetTest
Change-Id: Ica76a896e99f70a64af229bda68622a2ce0dea1f
2024-11-14 14:37:19 +00:00
Christopher Ferris
cbb59dd240 Add source of unwind when fatal error.
Sometimes the only log left is the errors messages. This means that
the information about why the unwind part of debuggerd is being called.
Therefore, add a little bit of extra information in the error message
to indicate why the unwind was triggered.

Bug: 377050125

Test: Forced the exec of the crash dump to fail and verified that the
Test: message is crash for a crash and unwind for debuggerd -b <PID>
Test: and debuggerd <PID>.
Change-Id: I0632ed9118c79caf4dabe6f174b25066fa9058fc
2024-11-14 03:59:29 +00:00
Akilesh Kailash
71ebf1a20d Merge "Revert "Move snapuserd_test to presubmit-large group"" into main 2024-11-13 20:44:51 +00:00
Priyanka Advani (xWF)
1b5a7addd9 Revert "Move snapuserd_test to presubmit-large group"
This reverts commit ac810ad718.

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

Change-Id: Icb08a969ba13d863832a90d224f96fe60af9de4b
2024-11-13 20:12:45 +00:00
Treehugger Robot
846b34f7f4 Merge "Move snapuserd_test to presubmit-large group" into main 2024-11-13 17:48:32 +00:00
Treehugger Robot
00503ef565 Merge "Set input thread priority to RT - try 4" into main 2024-11-13 16:30:27 +00:00
Elliott Hughes
3c63d0af34 Merge "Stop explicitly adding bionic subdirectories to the include path." into main 2024-11-13 13:17:10 +00:00
David Drysdale
014c710c27 Merge changes from topic "keymint-v3" into main
* changes:
  Declare previous version when using frozen HALs
  Set the proper FEATURE_HARDWARE_KEYSTORE version
2024-11-13 06:50:42 +00:00
Akilesh Kailash
ac810ad718 Move snapuserd_test to presubmit-large group
Bug: 338329603
Test: Build
Change-Id: I20d722a797093e40eb653a418a1963acf8c4292b
Signed-off-by: Akilesh Kailash <akailash@google.com>
2024-11-13 04:34:34 +00:00
Siarhei Vishniakou
9ad453ffae Set input thread priority to RT - try 4
This reverts commit 52da71d47b.

Reason for revert: camera was using its own stale copy of libprocessgroup, and now has revved up its version that includes the new parsing code. So this time the json file update should work OK.

Original description:

To improve input latency, set the critical input threads to RT priority.
This will use RT priority on AOSP devices by default. OEMs can still
choose to customize what "input policy" means for their device, which
may not necessarily mean RT.

For example, on device with multiple small / big cores, input task
affinity could be changed to prioritize big cores + higher CPU frequency
/ voltage, but still keep the standard / default input thread priority.

Note: there is an open issue where the thread priority is not remaining constant. See b/378761104.

Bug: 330719044
Bug: 378761104
Flag: com.android.input.flags.enable_input_policy_profile
Test: took perfetto trace and checked the priority on InputDispatcher
and InputReader threads.

Change-Id: I449be0eeeac989222f5deefa62615478bd65b968
2024-11-13 00:56:06 +00:00