| ebef121c | 01-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
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,
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>
show more ...
|
| 9aed8c32 | 02-Aug-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
ldelf: fix comment
ldelf_dump() does not exist, the comment about struct dump_entry_arg should refer to ldelf_arg::dump_entry() instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org
ldelf: fix comment
ldelf_dump() does not exist, the comment about struct dump_entry_arg should refer to ldelf_arg::dump_entry() instead.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| f5df167c | 09-Aug-2019 |
Sumit Garg <sumit.garg@linaro.org> |
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we n
ftrace: Add function execution time support
Add support to dump function execution time at corresponding function exit points in output ftrace buffer.
To achieve proper function execution time we need to exclude TA suspend time from timestamps, so add corresponding support in TEE core.
Also user mapping must be active to access ftrace buffer, so do that during TA resume.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU) Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e260ea8d | 19-Jul-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: fix warning in ftrace_init()
Fixes warning in ftrace_init():
ldelf/ftrace.c: In function ‘ftrace_init’: ldelf/ftrace.c:47:9: warning: cast to pointer from integer of different size [-Wint-to
ldelf: fix warning in ftrace_init()
Fixes warning in ftrace_init():
ldelf/ftrace.c: In function ‘ftrace_init’: ldelf/ftrace.c:47:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] fbuf = (struct ftrace_buf *)finfo->buf_start.ptr64; ^ Fixes: c96d7091b566 ("ftrace: Enable support for 32 bit apps") Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 9f392760 | 18-Jun-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
ldelf: use DT_HASH to lookup symbols faster
Use the ELF hash table to lookup symbols rather than iterating over the whole symbol table.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
ldelf: use DT_HASH to lookup symbols faster
Use the ELF hash table to lookup symbols rather than iterating over the whole symbol table.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 6720dd49 | 13-Jun-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
ldelf: support TA ASLR
Adds support in ldelf to load TAs using address space randomization if CFG_TA_ASLR=y. Works as before with the kernel mode ELF loader with two exceptions: - It falls back to d
ldelf: support TA ASLR
Adds support in ldelf to load TAs using address space randomization if CFG_TA_ASLR=y. Works as before with the kernel mode ELF loader with two exceptions: - It falls back to disable ASLR for a particular ELF if it fails to map using ASLR. - Each ELF is loaded with a randomized number of free pages in front. These free pages can be reused when loading other ELF permitting some ELF to become reordered in memory.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|