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
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
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>
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>
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>
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>
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
This change doesn't modify presubmit coverage, the tests will still
run in the lab as test mapping suite, just on a different ATP test
config that dedicated to tests can only run on CF (not aosp_cf), on
git_main branch.
Bug: 300519349
Test: atest presubmit check
Change-Id: Ib179c034dc58f8d8a763d374af0d103baf51343b
Vendor libraries can be linked dynamically now, but until more Rust
components are using it, static is more efficient.
Bug: 292062611
Test: TH
Change-Id: I3708f5fac1ace797b6233811adf3ec71218d5738
We only need a single binder thread to receive notifications, so we
should set the thread pool max to 0 rather than 1. startThreadPool()
starts one thread + the max count.
Test: m storageproxyd
Bug: 281951047
Fixes: 292030372
Change-Id: I53a90eaa2aa69469fd3a00b6da0d7061318c8ba9
The Trusty storage proxy requires that the suspend service is started to
acquire a wakelock for UFS RPMB operations. Without the binder thread
pool running, starting this service results in at least a 1s polling
delay. This change ensures that we start the thread pool before handling
any RPMB operations, so acquiring the wakelock will complete as soon as
the service is ready without needing to poll once per second.
Test: m storageproxyd
Test: Artificially delay suspend_service to check if we poll
Bug: 281951047
Change-Id: I1a4cdd48d57201b0cf9c24523d22e5bdbcea376a
Borrow the code from AttestKeyTest.cpp (in KeyMint VTS) for determining
the devices IMEI value(s), and use that as default value.
Also update to use the newer provisioning message if the second IMEI is
set.
Test: provision a test device
Change-Id: Ie8e183dc50ac9107c2c2c2966c591e8b6022fd20
Add android.trusty.stats.nw.setter.IStatsSetter interface
for sending an IStats interface from Android to Trusty.
Bug: 259517277
Test: /data/nativetest64/vendor/trusty_stats_test/trusty_stats_test
Change-Id: Ie3976cdf069dd47b51477a70eb597c76de79f522
This ensures that full integration testing is done when changes are made
to the KM/IRPC client HAL service for Trusty.
Test: The tests are run.
Change-Id: Id22bbac119f76653a5b2338e97f28032822741f0
* This command is needed to support provisioning KeyMintv3 attestation IDs
Bug: 265381212
Test: Ran KM Vts
Change-Id: I9b9bf3753b90c58096fa85a4e7303b47eaafe31f
Signed-off-by: Donnie Pollitz <donpollitz@google.com>
Trusty Benchmarks need to be evaluated in ABL which is much more
controlled than linux. However fastboot prints evry atomic message from
trusty/abl on its own line starting with "(bootloader)"
Bug: 263454481
Test: - "fastboot oem trusty runtest trusty.hwrng.bench"
Change-Id: I99847a8cc54457c8ec809e219736325dce0ac891
Replaced HIDL spec implementation with AIDL spec in gatekeeper
module. Based on the changes in aosp/2161796.
Bug: 268342724
Test: VtsHalGatekeeperTargetTest, CtsVerifier
Change-Id: Ic322e5c5a7d0577df28410a546cbad88549158bc