Closed jingdlu closed 3 years ago
The main reason is that we don't want to allow an unprivileged client to impersonate a tee-supplicant. Then it's also a convenient enabling slightly different behaviour in the driver callbacks.
But an unprivileged client can also open /dev/teepriv, right? How does it avoid an unprivileged client impersonating tee-supplicant?
No /dev/teepriv
is supposed to be protect by file permissions.
No
/dev/teepriv
is supposed to be protect by file permissions.
...in our QEMU/Buildroot setup for instance we have:
$ ls -l /dev/tee*
crw-rw---- 1 root teeclnt 247, 0 Jul 6 06:54 /dev/tee0
crw-rw---- 1 root tee 247, 16 Jul 6 06:54 /dev/teepriv0
Thanks for your info.
I know that /dev/tee is for normal client to do operations like opening session, invoking command and so on. /dev/teepriv is for tee-supplicant to do PRC command receiving and sending. I'm wondering why we don't put these operation in one device file. In the optee_supp_desc structure, TEE_DESC_PRIVILEGED flag will be set. What's the usage for this flag? or what's the usage for TEE_GEN_CAP_PRIVILEGED capability exported by tee_ioctl_version?
Thanks