Hi Alan,
I think you're right, the prototypes of these functions should be fixed. Moreover, I think psa_outvec *out_vecs should drop the const qualifier to match psa_call(...) prototypes, as it's an output parameter and needs to be non-const. I have raised https://developer.trustedfirmware.org/T313 to keep track of this.
Thanks, Antonio
________________________________ 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;
Alan
-- TF-M mailing list TF-M@lists.trustedfirmware.org https://lists.trustedfirmware.org/mailman/listinfo/tf-m