JJérôme Forissierldelf: syscall: support RISC-V ldelf sycall
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
ldelf: Provide access to TS load address Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions. Signed-off-by: Imre Kis <imre.kis@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: arm: support R_ARM_TLS_DTPMOD32 and R_ARM_TLS_DTPOFF32 relocations Preparing for C++ support in TAs. This commit adds support for Thread Local Storage (TLS) relocation types R_ARM_TLS_DTPMOD32 and R_ARM_TLS_DTPOFF32. OP-TEE does not support multi-threaded TAs so in principle there is no need to handle the TLS relocations. However, this commit will allow to run C++ TAs built with the "official" arm-linux-gnueabihf compiler (which is built with threading support enabled), as long as no multi-thread feature is explicitly used by the TA. In other words, it avoids the need to re-build a toolchain with --disable-threads. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 5 年前 | |
core, ldelf: add support for runtime loading of shared libraries This commit prepares the introduction of libdl, a dynamic linking library which will allow TAs to load shared libraries at run time, and resolve symbols on demand. It adds the following function to the system PTA, inspired from the POSIX dlopen() and dlsym(): - system_dlopen(): takes a UUID and flags. Performs an upcall into ldelf which then uses the usual system PTA functions to load an map the requested library into the address space of the calling TA. - system_dlsym(): takes a UUID and a symbol name. The symbol is looked up in the library specified by UUID by calling into ldelf. If UUID is all zeros, all the mapped binaries are searched. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> | 6 年前 | |
ldelf: arm: support R_ARM_TLS_DTPMOD32 and R_ARM_TLS_DTPOFF32 relocations Preparing for C++ support in TAs. This commit adds support for Thread Local Storage (TLS) relocation types R_ARM_TLS_DTPMOD32 and R_ARM_TLS_DTPOFF32. OP-TEE does not support multi-threaded TAs so in principle there is no need to handle the TLS relocations. However, this commit will allow to run C++ TAs built with the "official" arm-linux-gnueabihf compiler (which is built with threading support enabled), as long as no multi-thread feature is explicitly used by the TA. In other words, it avoids the need to re-build a toolchain with --disable-threads. Signed-off-by: Jerome Forissier <jerome@forissier.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 5 年前 | |
ftrace: Add support for syscall function tracer This patch adds support for syscall tracing in TEE core. It complements existing ftrace support for user TAs via adding trace for syscalls that are invoked by user TAs into the TEE core. And after this patch ftrace will cover both TA and TEE core code. So lets rename config option from CFG_TA_FTRACE_SUPPORT to CFG_FTRACE_SUPPORT. It is optional to enable syscall trace via CFG_SYSCALL_FTRACE=y config option in addition to CFG_FTRACE_SUPPORT=y config option. Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> | 6 年前 | |
ldelf: support RISC-V Add 64-bit RISC-V ldelf startup assembly and parsing 64-bit ELF files. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Tested-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: syscall: support RISC-V ldelf sycall Added 32-bit and 64-bit RISC-V ldelf system calls. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> | 3 年前 | |
core, ldelf: link: add --no-warn-execstack When building for arm32 with GNU binutils 2.39, the linker outputs warnings when generating some TEE core binaries (all_obj.o, init.o, unpaged.o and tee.elf) as well as ldelf.elf: arm-poky-linux-gnueabi-ld.bfd: warning: atomic_a32.o: missing .note.GNU-stack section implies executable stack arm-poky-linux-gnueabi-ld.bfd: NOTE: This behaviour is deprecated and will be removed in a future version of the linker The permissions used when mapping the TEE core stacks do not depend on any metadata found in the ELF file. Similarly when the TEE core loads ldelf it already creates a non-executable stack regardless of ELF information. Therefore we can safely ignore the warnings. This is done by adding the '--no-warn-execstack' option. Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: Provide access to TS load address Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions. Signed-off-by: Imre Kis <imre.kis@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: strip PAC from TA addresses When pointer authentication is enables for TA's, the LR values saved in the stack will have PAC which must be stripped off when unwinding the stack. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
ldelf: strip PAC from TA addresses When pointer authentication is enables for TA's, the LR values saved in the stack will have PAC which must be stripped off when unwinding the stack. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: ldelf: implement separate syscalls for ldelf Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> | 5 年前 | |
Generate ELF Note for BTI in all arm64 asm files Add program property note section in the assembly files to ensure that when linking them, program property note section is generated in the final ELF. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
ldelf: support RISC-V Add 64-bit RISC-V ldelf startup assembly and parsing 64-bit ELF files. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Tested-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: syscall: support RISC-V ldelf sycall Added 32-bit and 64-bit RISC-V ldelf system calls. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> | 3 年前 | |
core: ldelf: implement separate syscalls for ldelf Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> | 5 年前 | |
core: ldelf: implement separate syscalls for ldelf Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> | 5 年前 | |
core: ldelf: implement separate syscalls for ldelf Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> | 5 年前 | |
Generate ELF Note for BTI in all arm64 asm files Add program property note section in the assembly files to ensure that when linking them, program property note section is generated in the final ELF. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 | |
core: ldelf: implement separate syscalls for ldelf Implements a separate syscall handler for ldelf to decouple it from user TAs and enable using it for all TSs. The calling convention is the same as for utee_* syscalls. To distinguish between the different SVCs, the syscall handler pointer is updated before entering ldelf and restored after returning. The step of opening a system PTA session and invoking the commands there is eliminated, the necessary functionality is implemented in the ldelf syscall functions. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Balint Dobszay <balint.dobszay@arm.com> | 5 年前 | |
ldelf: syscall: support RISC-V ldelf sycall Added 32-bit and 64-bit RISC-V ldelf system calls. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Marouene Boubakri <marouene.boubakri@nxp.com> | 3 年前 | |
ldelf: Provide access to TS load address Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions. Signed-off-by: Imre Kis <imre.kis@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: Provide access to TS load address Propagate ELF load address from ldelf to user mode context as a preparation for load address relative memory regions. Signed-off-by: Imre Kis <imre.kis@arm.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
ldelf: support RISC-V Add 64-bit RISC-V ldelf startup assembly and parsing 64-bit ELF files. Signed-off-by: liushiwei <liushiwei@eswincomputing.com> Tested-by: liushiwei <liushiwei@eswincomputing.com> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 3 年前 | |
Generate ELF Note for BTI in all arm64 asm files Add program property note section in the assembly files to ensure that when linking them, program property note section is generated in the final ELF. Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> | 4 年前 |