Closed suntong30 closed 2 years ago
I know that TA can execute a third-party lib(crate), and the third-party lib must be a static link lib, right?
I believe OP-TEE supports TA dynamic linking. But if you are using Rust, all crates are statically linked.
So if there are some codes in crate that have to invoke system calls (such as read()/open()/write() in Linux), can Rust TA executes this code in secure world?
OP-TEE OS is not like Linux. Its syscalls are different. Here is a list: https://github.com/apache/incubator-teaclave-trustzone-sdk/blob/master/optee-utee/optee-utee-sys/src/utee_syscalls.rs.
@mssun Many thanks for your quick reply. https://github.com/OP-TEE/optee_os/issues/1909#issuecomment-341024444 This issue said that there is no dynamic linking for TAs.
OP-TEE OS is not like Linux. Its syscalls are different. Here is a list: https://github.com/apache/incubator-teaclave-trustzone-sdk/blob/master/optee-utee/optee-utee-sys/src/utee_syscalls.rs.
What I mean is that, if a crate has Linux system calls, can Rust OP-TEE execute this crate successfully?
thanks, Steph
What I mean is that, if a crate has Linux system calls, can Rust OP-TEE execute this crate successfully?
No.
OK, thanks for your reply.
Hello team, I am new to Rust OP-TEE. I use C/C++, and I haven't learned Rust. I know that TA can execute a third-party lib(
crate
), and the third-party lib must be a static link lib, right? So if there are some codes incrate
that have to invoke system calls (such as read()/open()/write() in Linux), can Rust TA executes this code in secure world?thanks, Steph