Hi, I have created a patch to manipulate the handle value returned to caller.
At first when we was implementing IPC we created an unique id for handle, the price is we need to loop searching for the data structure from the list with this id, which increases the execution time.
Then we optimized this part return the memory allocated directly - since the memory is protected by hardware, the memory content could not be retrieved, either.
But to avoid the potential information leakage or some side channel attack on handles, we need to disturb it before return to user. The returned handle contains only limited information so that it makes user hard to retrieve information on it.
Now the returned value is the offset inside handle pool, without showing the memory address directly. This can be enhanced later after the random generator is applied, we can disturb more on this part.
The patch is here: https://review.trustedfirmware.org/c/trusted-firmware-m/+/1962
Please help to comment in this thread or in the issue tracker: https://developer.trustedfirmware.org/T501
Thanks.
/Ken
tf-m@lists.trustedfirmware.org