This has been raised by Alan on the mailing list:
From: TF-M <tf-m-bounces@lists.trustedfirmware.org> on behalf of DeMars, Alan via TF-M <tf-m@lists.trustedfirmware.org>
Sent: 10 April 2019 22:12
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] psa_invec type mismatch in tfm_psa_call_veneer?It seems to me that the 'psa_invec' type is incorrectly being used where the 'psa_outvec' type should be used everywhere tfm_psa_call_veneer() is used.
In tfm_api.h, I think this:
psa_status_t tfm_psa_call_veneer(psa_handle_t handle,
const psa_invec *in_vecs, const psa_invec *out_vecs);should be this:
psa_status_t tfm_psa_call_veneer(psa_handle_t handle,
const psa_invec *in_vecs, const psa_outvec *out_vecs);And, in the implementation of the tfm_psa_call_veneer
within tfm_psa_api_client.c, I think this:
tfm_secure_gateway_attributes
psa_status_t tfm_psa_call_veneer(psa_handle_t handle,
const psa_invec *in_vecs, const psa_invec *out_vecs)should be this:
tfm_secure_gateway_attributes
psa_status_t tfm_psa_call_veneer(psa_handle_t handle,
const psa_invec *in_vecs, const psa_outvec *out_vecs)And, in the NS implementation of psa_call() within tfm_psa_ns_api.c, I think this:
psa_invec in_vecs, out_vecs;should be this:
psa_invec in_vecs; psa_outvec out_vecs;
Also, psa_outvec should drop the const qualifier as it's an output parameter that needs to be non-const.