Backport 1.1: Don't copy buffers for low-risk PSA operations #796

Open
gilles-peskine-arm wants to merge 6 commits from gilles-peskine-arm/psa-hash-no-buffer-copy-1.1 into tf-psa-crypto-1.1
gilles-peskine-arm commented 2026-05-28 08:32:18 -05:00 (Migrated from github.com)

Fix https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/795

Needs preceding PR: framework prerequisite

PR checklist

Fix https://github.com/Mbed-TLS/TF-PSA-Crypto/issues/795 Needs preceding PR: framework prerequisite ## PR checklist - [x] **changelog** provided - [x] **framework PR** provided https://github.com/Mbed-TLS/mbedtls-framework/pull/306 - [ ] **TF-PSA-Crypto development TODO - [x] **TF-PSA-Crypto 1.1 PR** provided https://github.com/Mbed-TLS/TF-PSA-Crypto/pull/796 - [x] **mbedtls development PR** not required because: crypto only - [x] **mbedtls 4.1 PR** not required because: crypto only - [ ] **mbedtls 3.6 PR** TODO - **tests** provided | not required because:
bjwtaylor (Migrated from github.com) reviewed 2026-06-01 09:27:08 -05:00
valeriosetti (Migrated from github.com) requested changes 2026-07-30 06:46:50 -05:00
valeriosetti (Migrated from github.com) left a comment

I found usage of LOCAL_INPUT_xxx in psa_xof_set_context. Shouldn't that be removed as well?

I found usage of `LOCAL_INPUT_xxx` in `psa_xof_set_context`. Shouldn't that be removed as well?
gilles-peskine-arm commented 2026-07-30 08:38:07 -05:00 (Migrated from github.com)

psa_xof_set_context probably got merged after I started working on this. Fixed.

I've pushed a commit to fix that. The CI will probably fail in mbedtls components because the branch is getting old. I'll rebase on top of 1.1 once the framework prerequisite is merged.

`psa_xof_set_context` probably got merged after I started working on this. Fixed. I've pushed a commit to fix that. The CI will probably fail in mbedtls components because the branch is getting old. I'll rebase on top of 1.1 once the framework prerequisite is merged.
valeriosetti (Migrated from github.com) reviewed 2026-07-30 08:41:57 -05:00
valeriosetti (Migrated from github.com) left a comment
No description provided.
I know that this PR will be rebased, but it looks good to me so I'm approving as a personal placeholder :)
bjwtaylor (Migrated from github.com) reviewed 2026-08-06 05:15:46 -05:00
@ -2541,22 +2497,15 @@ psa_status_t psa_xof_set_context(psa_xof_operation_t *operation,
}
bjwtaylor (Migrated from github.com) commented 2026-08-06 05:15:40 -05:00

Does this need to context_external?

Does this need to context_external?
valeriosetti (Migrated from github.com) approved these changes 2026-08-06 05:43:22 -05:00
bjwtaylor (Migrated from github.com) reviewed 2026-09-16 07:45:40 -05:00
bjwtaylor (Migrated from github.com) left a comment

Looks good, though I think it needs a rebase to resolve the CI issues.

Looks good, though I think it needs a rebase to resolve the CI issues.
This pull request has changes conflicting with the target branch.
  • framework
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1:gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'tf-psa-crypto-1.1'
git merge --no-ff 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git rebase 'tf-psa-crypto-1.1'
git switch 'tf-psa-crypto-1.1'
git merge --ff-only 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git rebase 'tf-psa-crypto-1.1'
git switch 'tf-psa-crypto-1.1'
git merge --no-ff 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'tf-psa-crypto-1.1'
git merge --squash 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'tf-psa-crypto-1.1'
git merge --ff-only 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git switch 'tf-psa-crypto-1.1'
git merge 'gilles-peskine-arm/psa-hash-no-buffer-copy-1.1'
git push origin 'tf-psa-crypto-1.1'
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-Mbed-TLS/TF-PSA-Crypto!796
No description provided.