Hi Folks,
Brian got one question about pre-provisioned keys, anyone could reply?
Hi Brian, you can subscribe the mailing list here: https://lists.trustedfirmware.org/mailman/listinfo/tf-m
Thanks.
/Ken
From: Quach, Brian <brian(a)ti.com>
Sent: Wednesday, May 27, 2020 6:36 AM
Subject: Pre-provisioned keys
Hi Ken,
Does TF-M have a plan for storing and accessing persistent keys (such as HUK) installed to flash at the factory prior to provisioning of the device? I had seen these as being stored outside of ITS flash in some compile time defined location and being read-only.
Regards,
Brian
Hi Ken,
Many similar abstractions for compiler C language extensions are provided by cmsis_compiler.h, already copied into the TF-M code base. If it does not meet all of our needs, should we consider proposing improvements to the upstream CMSIS project?
Kind regards,
Jamie
From: TF-M <tf-m-bounces(a)lists.trustedfirmware.org> On Behalf Of Ken Liu via TF-M
Sent: 25 May 2020 05:02
To: tf-m(a)lists.trustedfirmware.org
Cc: nd <nd(a)arm.com>
Subject: [TF-M] [Compiler related] Unify necessary and minimal set compiler definitions for SPM
Hi,
We created a proposal to define a minimal set of compiler specific-definitions for SPM. The reason is to avoid many #ifdef inside SPM code.
Only limited definitions are defined. Platform sources need to use platform defined headers for these definitions, such as CMSIS headers.
Special usage such as 'weak' or 'noreturn' are forbidden inside SPM.
Please put comments for this change:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/4211
Or reply here.
This is just an example patch, the follow up would apply this defined headers to all SPM sources.
Thanks
/Ken
Hi,
We created a proposal to define a minimal set of compiler specific-definitions for SPM. The reason is to avoid many #ifdef inside SPM code.
Only limited definitions are defined. Platform sources need to use platform defined headers for these definitions, such as CMSIS headers.
Special usage such as 'weak' or 'noreturn' are forbidden inside SPM.
Please put comments for this change:
https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/4211
Or reply here.
This is just an example patch, the follow up would apply this defined headers to all SPM sources.
Thanks
/Ken
Hi all,
In the current implementation, every secure function has an associated veneer function. Therefore, there are so many veneer functions in ‘tfm_veneers.c’, which have a similar prototype.
This would lead to:
* Waste of the veneer and secure function size – these APIs have a similar prototype, and they have unified NS dispatcher already.
* More secure functions lead to more veneers and potential re-configuration of the non-secure callable area.
This patch tries to unify the service entry so that:
* Similar function codes do not need to be duplicated.
* Keeping almost the same performance.
This is also an experiment patch to start the journey to the SFN model Andrew proposed. Let’s see the feedbacks and decide what to do in the next step.
https://review.trustedfirmware.org/c/trusted-firmware-m/+/4115
Please do feedback, especially the library model users – please check what kinds of the inconvenience it brings so that we can discuss the correct shape.
Here are some details in the patch:
Prototype of the unified veneer function:
psa_status_t tfm_sfc_call(uint32_t ctrl, psa_invec *in_vec, psa_outvec *out_vec);
where:
the uint32_t type parameter ‘ctrl’ is a pack of parameters - psa invec length, psa outvec length, and function identifier.
[8 bits for inlen][8 bits for outlen][16 bits for function identifier]
This is to avoid the condition that 5 parameters will cause re-wrapping of parameters.
Time cost and code size measurement:
github-tracking
Use the unified veneer
cost of a veneer call is 1264
cost of an interrupt is 941
veneer used 832B, region size 832B, 100%
cost of a veneer call is 1274
cost of an interrupt is 941
veneer used 64B, region size 832B, 7.69%
Thanks,
Mingyang
Hello,
I would like to understand the background behind roadmap item "Provisioning" that is mentioned here [1] (Slide 31) and here [2].
What provisioning functionality would we be talking here, is it provisioning as in "RoT provisioning", so more towards manufacturing as defined in the PSA security lifecycle, or provisioning when the device is in state "Secured", so more towards application specific-data? I would assume the latter, but couldn't find any more information on this subject. Any pointers would be highly appreciated.
Thanks for your help & kind regards,
Gernot
[1] https://static.linaro.org/connect/san19/presentations/san19-203.pdf
[2] https://developer.trustedfirmware.org/w/tf_m/planning/