New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CFG_RPMB_FS_DEV_ID and OP-TEE core awaraness about RPMB device id #4343
Comments
It's there for historical reasons. Keep in mind that it tee-supplicant need to know which RPMB device to use too. |
I have some suggestions how it can be addressed from my POV, could you please provide your feedback:
|
Thanks for looking into this problem. Of these I prefer option 2, with a twist. If information is found in DT (or possibly somewhere else in normal world) then the device id provided by OP-TEE is ignored. The linux tee-supplicant can perhaps look in |
That sounds good to me too. Normal world is free to use any means to find the proper device, the only thing that matters is that OP-TEE is always presented with the same device (and if not, OP-TEE will detect it thanks to the RPMB key). |
If there's only one in the system, it's pretty obvious which to try. If there are more, i agree it's not convenient to define REE emmc device ID value from secure world. Will supplicant be allowed to read in /sys/firmware/devicetree in some SELinux like constrained contexts? Maybe optee driver could have some DT property bindings for sharing ID between optee drv and optee core, in case of several emmc to distinguish. |
Thanks @jenswi-linaro @jforissier @etienne-lms for your input
I was about to suggest something like this:
The problem here is too find an association between a DT node and udev node in To do that we have to (for the example of
Additional udev rules can also affect how the dev node will be named, so likely we can end up with empty |
Just to make the story short having mmc2 alias in DT doesn't guarantee that mmc device will be probed as /dev/mmcblk2 in Linux. |
RFC for U-Boot: |
We need input from DT maintainer. If this approach isn't acceptable we'll need to find something else. |
This issue has been marked as a stale issue because it has been open (more than) 30 days with no activity. Remove the stale label or add a comment, otherwise this issue will automatically be closed in 5 days. Note, that you can always re-open a closed issue at any time. |
Hi,
Is there any particular reason why OP-TEE core should be aware about RPMB dev id?
Why not to let OP-TEE linux driver/TEE supplicant make decisions about dev node to use for accessing
RPMB hw partition (for example, that information can be pulled from DT as an option)?
AFAIR 2-3 years ago we already discussed the issue with different probe order of mmc in U-Boot/Linux, when
eMMC has different ids in U-Boot/Linux (usually SD/eMMC are swapped), but don't re-call what decision (how to address that) we arrived at during that discussion.
Thanks!
The text was updated successfully, but these errors were encountered: