summaryrefslogtreecommitdiff
path: root/trusty
AgeCommit message (Collapse)Author
12 daysUse shared trusty OWNERs fileSeth Moore
Change-Id: I20f118c39927f56890a37eaa059249db5285e59b
2024-05-17[Trusty][Metrics] Update struct to add is_crash on the NS sideSnehal
Bug: 340509044 Change-Id: I4547286c5cefa3caaf1bf1c30f205145fb5e689c
2024-05-07Merge "[Trusty][Coverage] Update counter to let Trusty know coverage dump ↵Treehugger Robot
has been read" into main
2024-05-07[Trusty][Coverage] Update counter to let Trusty know coverage dump has been readSnehal
Bug: 339194547 Change-Id: I075742200998e837e59ba9c24e4dca8b5d4d1199
2024-04-30[Coverage] Fix coverage bug in which extra garbage is being writtenSnehal
Bug: 296356127 Change-Id: I2e4128af461b297bbe170c015dc52899089e9b8b
2024-04-22storageproxyd: Fix x86 buildsDonnie Pollitz
Background: * printf format specifiers and size_t literal were invalid. Bug: 324989972 Test: Builds Change-Id: I408cfe0d41fb6850d5dcfe9963bb88be48f4a0c6 Signed-off-by: Donnie Pollitz <donpollitz@google.com>
2024-04-22Merge "storageproxyd: Add arguments for storage mapping and max file" into mainDonnie Pollitz
2024-04-17Warn that reboot might be needed after setting IDsDavid Drysdale
Test: compile Change-Id: Iac93f6a60df7e1a9f89183deabb37e0efc16df91
2024-04-15storageproxyd: Add arguments for storage mapping and max fileDonnie Pollitz
Background: * -f = Allows mapping files in the format `-f file:backing_file`. This can be used for mapping secure storage files like `0` and `persist/0` to block devices. Storageproxyd will handle creating the appropriate symlinks in the root datapath * -m = Allows specifying the the max size constraint for file backed storages. The constraint is chosen by giving a file, this allows for passing a block device for which a max file size can be queried. File based storages will be constrained to that size as well. Bug: 324989972 Test: File sizes are restricted as specified, and mappings are created Change-Id: I8ff550afafbd372288daa9e27c4db3451948b25d Signed-off-by: Donnie Pollitz <donpollitz@google.com>
2024-04-08Merge "lib/trusty: tipc-test should not print results to error stream" into mainRaphaël Hérouart
2024-04-08lib/trusty: tipc-test should not print results to error streamRaphael Herouart
tipc-test results cannot be parsed in the CI because they output to error stream Bug: 314130383 Test: /data/nativetest64/vendor/tipc-test/tipc-test -t echo -r 1 -B 100 Change-Id: I2d6506fd69af06338041035526ca759884719c7b
2024-04-05Merge "lib/trusty: tipc-test suite name is incorrect in JSON output" into mainRaphaël Hérouart
2024-04-05lib/trusty: tipc-test suite name is incorrect in JSON outputRaphael Herouart
tipc-test suite should be tipc not crypto Bug: 314130383 Test: /data/nativetest64/vendor/tipc-test/tipc-test -t echo -r 1 -B 100 Change-Id: Icc0921a032f8b784f4797f43b6180136777f422f
2024-04-02Update needed for Rust v1.77.0Charisee
error: field `0` is never read --> system/core/trusty/keymint/src/keymint_hal_main.rs:40:24 | 40 | struct HalServiceError(String); | --------------- ^^^^^^ | | | field in this struct | = note: `HalServiceError` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 40 | struct HalServiceError(()); | ~~ Bug: http://b/330185853 Test: ./test_compiler.py --prebuilt-path dist/rust-dev.tar.xz --target aosp_cf_x86_64_phone --image Change-Id: I79fb9019ba00900508aead414de80edd51f3fa2e
2024-03-19trusty: rpmb_dev: Use socket from init and update init scriptArve Hjønnevåg
Stop creating a socket on a persistent filesystem and use a socket created by init in /dev/socket/ instead. Many init script changes to make rpmb_dev.rc usable on cuttlefish. Test: Build and run aosp_cf_x86_64_phone_trusty_vm-trunk_staging-userdebug Bug: 309007107 Change-Id: Idc830211b3298d25bbb310dcb7489dd89fe5afc6
2024-03-06[Metrics] Add helper data structures to parse metrics messagesSnehal
Bug: 323508669 Change-Id: Ic4716dd47168481b6aa780f55d9db1208623b61d
2024-02-21Drop TODO for flag enablementDavid Drysdale
Flag control for enabling Secretkeeper is done in the device-specific makefiles, triggering whether they set SECRETKEEPER_ENABLED:=true Test: none, comment change Change-Id: I399d1840519864687aca6c53697317d449eed325
2024-02-13Sync tipc.h with one from trustySnehal
Bug: 325069766 Test: Android boot and crasher test Change-Id: I36244cfb698a81be79c204eb019e1a59b90d2e6c
2024-02-06Replace use of deprecated logging functionsJeff Vander Stoep
This is needed to upgrade the android_logger crate from 0.12.0 to 0.13.3. with_max_level provides the same functionality as with_min_level. The renaming is admittedly confusing, but the new name is accurate and it makes sense that they deprecated and then removed the previously poorly named with_min_level. See crate documentation [1] and code [2]. [1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level [2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227 Bug: 322718401 Test: build and run CF with the change. Test: m aosp_cf_x86_64_phone Change-Id: Ib4fbd486267d30e74e886139846950b066848d43
2024-01-30Secretkeeper: require SECRETKEEPER_ENABLED=trueDavid Drysdale
Make the makefile safer by requiring a specific value for the environment variable that turns on Secretkeeper Bug: 306364873 Test: TreeHugger Change-Id: Ic5bb5e7411a19941f58ec8c973104c1e53f3834f
2024-01-29Merge "Secretkeeper HAL: support large messages" into mainDavid Drysdale
2024-01-26Merge "Revert "rpc_binder: Change `trusty_tipc_fuzzer` to support multiple ↵David Drysdale
connections and messages"" into main
2024-01-26Merge "trusty: clear fuzzer's extra counters directly" into mainRyan Prichard
2024-01-23Secretkeeper HAL: support large messagesDavid Drysdale
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-18Merge "Secretkeeper: add Trusty fuzzers" into mainDavid Drysdale
2024-01-18Merge "Initial Secretkeeper HAL service for Trusty" into mainDavid Drysdale
2024-01-17tipc-test: Allow tipc tests to be run as benchmarksRaphael Herouart
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-12Revert "rpc_binder: Change `trusty_tipc_fuzzer` to support multiple ↵David Drysdale
connections and messages" This reverts commit 589c8d1e44cff96092c943f22cc10a9c23b81c01. Reason for revert: fuzzer crashes immediately on line 99 as vector is empty Change-Id: I5e56a94671a43cd131c250d98f7cfae3c96f34ab
2024-01-12Secretkeeper: add Trusty fuzzersDavid Drysdale
Bug: 306364873 Test: initial short run of fuzzers on device, with aosp/2737933 reverted Change-Id: I00ac6ab2678697d69a71aa3615c580c210772f20
2024-01-11trusty: clear fuzzer's extra counters directlyRyan Prichard
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-11Initial Secretkeeper HAL service for TrustyDavid Drysdale
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
2023-12-18trusty: storageproxyd: fix logging of freed path pointerMike McTernan
Bug: 316859216 Test: build.py Change-Id: I09557d43cda13e21175ba6fceeb806ec1f9115e1
2023-12-07trusty: apploader: fail specifically if app package is 0 bytesMike McTernan
Replace assert with check and log message. Also log more about the request if DMA heap allocation fails. Bug: 315283243 Test: boot to home Test: touch x && trusty_apploader x Change-Id: Ic075809fd2a6b09d9c4e8dff986709c4deae8fb7
2023-11-30Remove marcone@google.com from trusty/OWNERSOwner Cleanup Bot
This suggested change is automatically generated based on group memberships and affiliations. If this change is unnecessary or in error, vote CR -1 and the bot will abandon it. Vote CR +1/2 to approve this change. See the owner's recent activity for context: https://android-review.googlesource.com/q/marcone@google.com To report an issue, file a bug in the Infra>Codereview component. Change-Id: Ia8f5d261cbfc7328c7dffa0bdf92a5732ba3eee8
2023-10-19Merge "Add tipc fuzzer for KeyMint/Rust" into mainDavid Drysdale
2023-10-12Merge "trusty: Remove explicit page-alignment of mmap and dmabuf ↵Kalesh Singh
allocations" into main
2023-10-12Merge "libtrusty: Remove PAGE_SIZE usage" into mainTreehugger Robot
2023-10-12Merge "trusty: tipc_fuzzer: Remove use of PAGE_SIZE" into mainTreehugger Robot
2023-10-12trusty: Remove explicit page-alignment of mmap and dmabuf allocationsKalesh Singh
bionic hard codes the PAGE_SIZE macro as 4096. This is going away as Android begins to support larger page sizes. trusty uses PAGE_SIZE to round up the allocation size of the DMA buffers and mmap sizes. This is not explicitly needed since the kernel will always give you a page-aligned and page-sized multiple allocation when allocating a dmabuf or mmap-ing. Remove this PAGE_SIZE usage from TrustyApp, app_fuzzer, coverage, line-coverage, modulewrapper. Bug: 294914413 Test: Boot test on 16k device Change-Id: Iad922e0a152cb80db2e59e696d7556602fd17d67 Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12libtrusty: Remove PAGE_SIZE usageKalesh Singh
bionic provides PAGE_SIZE macro which happens to also match the 4096 chunk size in the tips_test. PAGE_SIZE is being removed as no other libc provides this and Android is moving towards being page-size-agnostic. Use 4096 chunk size for tipc-tests; fix incorrect size in munmap cleanup; and add failure log for send-fd test. Test: tipc-test -t "send-fd" Bug: 294914413 Change-Id: I7e5ec6480fff6bc1b4e8eed57eadf081cf82a72f Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12keymaster: Remove usage of PAGE_SIZEKalesh Singh
bionic provides PAGE_SIZE macro which happens to also match the size keymaster send buffer (4096) and half the size of the recv buffer. PAGE_SIZE is being removed as no other libc provides this and Android is moving towards being page-size-agnostic. Use a 4096 constant instead. Test: Boot 16k device Bug: 294914413 Change-Id: I2dc10b48811e24d25ba08cfe4ffb514e94d42a8f Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-12trusty: tipc_fuzzer: Remove use of PAGE_SIZEKalesh Singh
tipc_fuzzer writes random data of length 'size' and then attempts to read back data up to 'TIPC_MAX_MSG_SIZE' in length. Since 'size' is unrestricted we can always write more than the subsequent read; and in effect the fuzzer only checks that we can read something. Remove the read buffer's dependency on PAGE_SIZE. Bug: 294914413 Test: mma Change-Id: I909b49fda4e6ebf49f69b3c09ac29ff8629215ef Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2023-10-10Merge "rpc_binder: Change `trusty_tipc_fuzzer` to support multiple ↵Treehugger Robot
connections and messages" into main
2023-10-09acvp: handle flush commond in modulewrapper as stated in BoringSSL.Yurii Shutkin
Change-Id: Ife655f0764851cf2d9677abd507daec3f531031e Bug: 287626912 Test: ACVP test
2023-10-04s/master/main/Elliott Hughes
Test: treehugger Change-Id: Iabb23436d92686b934f2f2609217714b64ae75de
2023-09-27Remove ambgiuity in format specifierSnehal
Bug: 302163991 Test: m trusty-coverage-controller Change-Id: I26318eeb4a6770bd01d3c677ca3cf5c76ce33fa0
2023-09-25rpc_binder: Change `trusty_tipc_fuzzer` to support multiple connections and ↵Khyber Sen
messages This changes `trusty_tipc_fuzzer` to be more like the existing binder rpc_fuzzer, which opens and closes multiple connections and sends multiple messages in a single fuzz input. The max number of connections is controlled by the define `TRUSTY_APP_MAX_CONNECTIONS`, which defaults to `1`, thus keeping the existing behavior for now. In the next CL, I'll add more fuzzers with `-DTRUSTY_APP_MAX_CONNECTIONS=10` instead. Test: Build and run in trusty emulator Change-Id: I9692e4d0295052a8da2204f63be9e52939e70ac3
2023-09-22Merge changes I7790dde8,I065907a5,Id2e82024 into mainRyan Prichard
* changes: Add missing <assert.h> include Add missing <functional> and <vector> includes snapuserd_test: don't discard result of std::async
2023-09-21Add missing <assert.h> includeRyan Prichard
Bug: 175635923 Test: m MODULES-IN-system-core-trusty Change-Id: I7790dde8eba948cf95cb14dd2b436c3f6f88765a
2023-09-20Remove unnecessary keyword settingDan Shi
These 2 tests can run on aosp cf. Bug: 300519349 Test: atest presubmit check Change-Id: I8ee41c2abe464be2c2ee4537de5edf86308183aa