Skip to content

PSA IPC: use the non-secure client's 32-bit size types - #1009

Open
kojo1 wants to merge 1 commit into
wolfSSL:masterfrom
kojo1:client-size-types
Open

kojo1 wants to merge 1 commit into
wolfSSL:masterfrom
kojo1:client-size-types

Conversation

@kojo1

@kojo1 kojo1 commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

The secure side declared rot_size_t as size_t and answered PS GET_INFO
with size_t fields, while the non-secure client sends and expects uint32_t.
The two agree on 32-bit Cortex-M, but with the secure side built for a
64-bit host psa_ps_get(), psa_ps_get_info() and
psa_initial_attest_get_token_size() fail with
PSA_ERROR_INVALID_ARGUMENT / PSA_ERROR_BUFFER_TOO_SMALL.

Copilot AI balanced review requested due to automatic review settings November 30, 2026 00:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change aligning PSA IPC size fields with the client’s 32-bit wire format.

No open issues 🎉

What changed in this PR

Aligns secure-side PSA IPC size fields with the non-secure client’s 32-bit wire format, addressing size mismatches on 64-bit hosts.

Changes:

  • Changes rot_size_t and protected-storage metadata size fields to use 32-bit values.
  • Adds a regression test for client-formatted storage reads with offsets and storage-info responses.
File Description
tools/​unit-tests/​unit-arm-tee-psa-ipc.c Adds and registers a test for the client’s 32-bit wire format.
src/​arm_tee_psa_ipc.c Uses fixed-width size types and converts stored entry sizes for responses.

Review effort: Balanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants