Hi,
Sorry 2nd link was broken. Here is the working version:
https://www.ietf.org/archive/id/draft-tschofenig-rats-psa-token-09.html#tab…
Tamas Ban
From: Andersson, Joakim <Joakim.Andersson(a)nordicsemi.no>
Sent: 2022. május 9., hétfő 12:14
To: Tamas Ban <Tamas.Ban(a)arm.com>
Subject: RE: Attestation token new spec
Is te second link broken? I get a 404 error code.
-Joakim
From: Tamas Ban via TF-M <tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>>
Sent: mandag 9. mai 2022 11:31
To: tf-m(a)lists.trustedfirmware.org<mailto:tf-m@lists.trustedfirmware.org>
Cc: nd <nd(a)arm.com<mailto:nd@arm.com>>
Subject: [TF-M] Attestation token new spec
Hi,
the initial attestation token implementation is aligned with this specification:
https://datatracker.ietf.org/doc/html/draft-tschofenig-rats-psa-token-05<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatrack…>
This spec is still evolving and there is a newer version which changes the key values of the claims in the token:
https://www.ietf.org/archive/id/draft-tschofenig-rats-psa-token-09.html#tab…<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.…>
This can cause combability issues between token issuer (device) and token verifier (some remote verification service).
This is an ABI change between token issuer and consumer.
The breaking effect would be manifest in unaccepted IAT tokens by the verifier.
On-device side I see these options to make the transition:
- A build-time option could be introduced which determines which range of key numbers to use. The default value would be the new range. To not let new users pick up the old values accidentally. Existing users can notice the incompatibility issue during the integration test and adjust their build command accordingly. However, the old range would be announced as deprecated in the next TF-M release, then will be removed in the next release after.
- Immediate switch over to the new range, without supporting the old range anymore. On the verification service side, an SW update can handle the transition and might be accepting both ranges for a while. I assume the verification service can be updated more easily than remote devices therefore better to handle the compatibility issue there.
- Keeping the support for both ranges for the long term and letting users choose by build time.
Please share your thoughts on:
- Are you aware that the attestation service is used in deployed devices where this transition can cause incompatibility?
- From the above list which option would you vote to support the transition?
Best regards,
Tamas Ban
Hi all,
I faced the problem that mailbox configuration of secure image differs from one provided for non-secure. It's because I'm using a split-build but a little bit different that is prepared for v2.0. I think we can minimize dependencies and unexpected impacts between different images when common data structures will have less customization.
Currently we have three options that can change mailbox structures:
1. NUM_MAILBOX_QUEUE_SLOT - number of mailbox slots
2. TFM_MULTI_CORE_NS_OS_MAILBOX_THREAD - defines which NS client implementation is selected.
3. TFM_MULTI_CORE_TEST - specify whether NS multi-core test suite is built.
There is requirement that NUM_MAILBOX_QUEUE_SLOT must be set to 1 if NS bare metal environment is used. But this limitation is excessive. Because it's important that secure side is not using slots that are not used by non-secure side. It can be possible to use NS bare metal client even if mailbox queue size is more than one, it's just the waste of resources in such case. But it can bring a benefit that it's possible to build secure image with default settings (aka 4 mailbox slots) and there is no need to rebuild it if there will be decision to switch from RTOS to bare metal environment which can be useful for some end-user use cases.
More flexible update will be to pass number of allocated slots from NS side to TF-M during initialization, it's just important to validate that number of slots doesn't not exceed maximum supported by design.
TFM_MULTI_CORE_NS_OS_MAILBOX_THREAD is another problem, because mailbox_reply_t allocates data that are not shared but used by non-secure side only. Which means that it's important to decide which NS client implementation is going to be used when TF-M is built. I see two different solutions for this problem:
1. Use union to allocate space for both of them and let decide NS client implementation which on to use. Something like this:
struct mailbox_reply_t {
union
{
//#ifdef TFM_MULTI_CORE_NS_OS_MAILBOX_THREAD
uint8_t *woken_flag; /* Indicate that owner task has been
* or should be woken up, after the
* reply is received.
*/
//#else
bool is_woken; /* Indicate that owner task has been
* or should be woken up, after the
* reply is received.
*/
//#endif
};
};
1. Redesign mailbox by separating data that are used by NS client from data that are shared between cores. So, it will be much easier to update non-secure client without touching secure image.
It looks like there is data needed for test suite only (nr_tx and nr_used_slots fields of ns_mailbox_queue_t) defined by TFM_MULTI_CORE_TEST. I think we can allocate it in test suite only, so there will be no need to allocate this data in shared structure and there will not be the case when location of is_full field of ns_mailbox_queue_t accessed by both cores have different location if TFM_MULTI_CORE_TEST configuration is not applied the same way for both secure and non-secure images.
Regards,
Roman.
Hi, I'm seeing references in the documentation for preload.cmake and several files with that name in TF-M v2.0.0. But looking at the code it seems like preload.cmake was replaced with cpuarch.cmake. Am I missing something? Where should be put fixed platform-specific definitions which are not related to CPU architecture?
Regards,
Brian Quach
SimpleLink MCU
Texas Instruments Inc.
Hi all
It seems to me like following check
# FWU_DEVICE_CONFIG_FILE exists and is a file
if(NOT EXISTS ${FWU_DEVICE_CONFIG_FILE})
message(FATAL_ERROR "FWU_DEVICE_CONFIG_FILE:${FWU_DEVICE_CONFIG_FILE} does not exist.")
elseif(IS_DIRECTORY ${FWU_DEVICE_CONFIG_FILE})
message(FATAL_ERROR "FWU_DEVICE_CONFIG_FILE:${FWU_DEVICE_CONFIG_FILE} is a folder while a file is expected.")
endif()
in secure_fw/partitions/firmware_update/CMakeLists.txt is redundant as FWU_DEVICE_CONFIG_FILE may be generated, thus not present when cmake performs EXISTS check (note that by default FWU_DEVICE_CONFIG_FILE is generated so I dont see point in limiting user from using generated file)
So i propose to remove this check.
Regards,
Bohdan Hunko
Cypress Semiconductor Ukraine
Engineer
CSUKR CSS ICW SW FW
Mobile: +38099 50 19 714
Bohdan.Hunko(a)infineon.com<mailto:Bohdan.Hunko@infineon.com>
Hello,
I am happy to announce the new release of TF-M v2.0.0<https://git.trustedfirmware.org/TF-M/trusted-firmware-m.git/tag/?h=TF-Mv2.0…>.
The major version update indicates the important changes in the way TF-M builds.
New major features are:
* TF-M secure build process and non-secure build process are split.
* Refer to TF-M Build Instruction to build SPE image.
* Refer to Building Tests to build non-secure tests.
* Update new Mailbox agent API.
* Decouple the specific application Mailbox from SPM, make it an application in Secure Partition.
* Unify the interfaces between partitions and SPM, and reduces the interaction interface between them.
* Multi-core support in the Secure Function (SFN) model.
* Optimize SPM critical section implementation to reduce time cost in isolation level 2&3.
* Use local variables for connection handles instead of dynamic allocation.
* P256-M component is enabled on the TF-M side in profile medium.
* MCUboot upgrade to v2.0.0.
* Mbed TLS upgrade to v3.5.0.
* TF-M PSA client API performance profiling is tracked in SQUAD and the profiling tool is updated.
* TF-M integrates Read the Docs.
Please check the release notes<https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/25143/12/doc…> for more information.
The release branch changes will be ported to the main branch shortly.
Many thanks to everyone for contributing, reviewing and supporting this milestone.
Anton
The Laird Connectivity platform board BL5340 DVK no longer compiles in the main branch of TF-M after the split build feature was merged.
The BL5340 DVK is a module that contains the nRF5340 SoC, because of this the platform is re-using the Nordic platform support files.
This cross-reference is causing us, the maintainers of Nordic a lot of problems as making changes to the Nordic platform code can break the Laird Connectivity platform.
We don't have this board either to run any tests and confirm any changes.
Laird Connectivity has not contributed to the platform support for more than a year.
Nordics strategy for maintaining support for TF-M is to have the base DK supported in TF-M for testing purposes, and then provide support for all other boards in our SDK through our board support configuration system.
Removing the platform from TF-M will still mean that the BL5340 DVK board is supported in the nRF Connect SDK.
To support the board in the Zephyr Project the following PR is needed: https://github.com/zephyrproject-rtos/zephyr/pull/65823
Joakim Andersson
Nordic Semiconductor
hello.
I have ported corestone1000 plaform to tfm and am trying to use mhu to send and receive messages between secure enclave (SPE)core and host core(NSPE). (I want to use it for future encryption requests).
Looking at the rss platform and corstone-1000 tfm code, the function for initializing and registering the mhu seems to be tfm_inter_core_comm_init.
But I can't find the part that calls tfm_inter_core_comm_init.
Can anyone tell me the procedure and a simple example of sending and receiving messages using MHU in a TFM environment? I've been looking through the TFM documentation, but I can't find it yet.
Below is the tfm_inter_core_comm_init function to register the rpc of the spe in rss.
I was wondering where the function below is called and used.
int32_t tfm_inter_core_comm_init(void)
{ int
int32_t ret;
/* Register RPC callbacks */
ret = tfm_rpc_register_ops(&rpc_ops);
if (ret != TFM_RPC_SUCCESS) {
return ret;
}
/* Platform specific initialization */
ret = tfm_multi_core_hal_init();
if (ret != TFM_PLAT_ERR_SUCCESS) {
tfm_rpc_unregister_ops();
return ret;
}
} return TFM_RPC_SUCCESS;
}
You are a newbie to TFM and are looking for help.