| #
04e46975 |
| 16-Dec-2024 |
Etienne Carriere <etienne.carriere@foss.st.com> |
tree-wide: use ROUNDUP_DIV() where applicable
Use ROUNDUP_DIV() instead of ROUNDUP(..., size) / size where applicable.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Je
tree-wide: use ROUNDUP_DIV() where applicable
Use ROUNDUP_DIV() instead of ROUNDUP(..., size) / size where applicable.
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
8670803b |
| 25-Aug-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: use BB_MEMDUP_USER() where needed
Uses BB_MEMDUP_USER() instead of bb_memdup_user() where the destination buffer isn't a void * in order to avoid using a extra void * variable to handle the ou
core: use BB_MEMDUP_USER() where needed
Uses BB_MEMDUP_USER() instead of bb_memdup_user() where the destination buffer isn't a void * in order to avoid using a extra void * variable to handle the output pointer from bb_memdup_user().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
031dca8e |
| 12-Jul-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix reading result in ldelf_dlopen()
The commit 52e7b1a67f8f ("core: use user-access functions in ldelf interaction") start to use a bounce buffer to initialize the argument for LDELF_DL_ENTRY
core: fix reading result in ldelf_dlopen()
The commit 52e7b1a67f8f ("core: use user-access functions in ldelf interaction") start to use a bounce buffer to initialize the argument for LDELF_DL_ENTRY_DLSYM. However, it also reads the result of LDELF_DL_ENTRY_DLSYM from the bounce buffer. This is an error since the result of LDELF_DL_ENTRY_DLSYM still remains on the stack used by ldelf. So fix this by reading the result from the ldelf stack.
Fixes: 52e7b1a67f8f ("core: use user-access functions in ldelf interaction") Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
415e25bb |
| 09-Jul-2023 |
Alvin Chang <alvinga@andestech.com> |
core: fix ldelf invalid access to user stack with CFG_PAN=y
When CFG_PAN is enabled, OP-TEE kernel can not directly access the user memory, otherwise an exception occurs. To fix it, we apply user-ac
core: fix ldelf invalid access to user stack with CFG_PAN=y
When CFG_PAN is enabled, OP-TEE kernel can not directly access the user memory, otherwise an exception occurs. To fix it, we apply user-access functions when ldelf gets the parameters from the user stack "arg".
Fixes: 52e7b1a67f8f ("core: use user-access functions in ldelf interaction") Signed-off-by: Alvin Chang <alvinga@andestech.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
52e7b1a6 |
| 14-Jun-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: use user-access functions in ldelf interaction
When interacting with LDELF, replace implicit user space accesses from privileged mode using proper user-access functions.
Co-developed-by: Seon
core: use user-access functions in ldelf interaction
When interacting with LDELF, replace implicit user space accesses from privileged mode using proper user-access functions.
Co-developed-by: Seonghyun Park <seonghp@amazon.com> Signed-off-by: Seonghyun Park <seonghp@amazon.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
c5a0db99 |
| 14-Jun-2023 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add bounce buffer to user mode context
Adds a bounce buffer for user space buffer to be used during syscall processing to avoid unchecked privileged access into user space memory.
bb_alloc(),
core: add bounce buffer to user mode context
Adds a bounce buffer for user space buffer to be used during syscall processing to avoid unchecked privileged access into user space memory.
bb_alloc(), bb_free(), and bb_reset() are added to manage memory allocation from the bounce buffer.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
show more ...
|
| #
af78e1b1 |
| 24-Oct-2022 |
Imre Kis <imre.kis@arm.com> |
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.
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>
show more ...
|
| #
74f6dd9b |
| 01-Feb-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core, ldelf: add support for RISC-V
RISC-V support of argument for ldelf dump state.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@lin
core, ldelf: add support for RISC-V
RISC-V support of argument for ldelf dump state.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
cb5f271c |
| 01-Feb-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core, ldelf: replace is_arm32 with is_32bit
To refer to 32-bit mode, this commit replace is_arm32 with is_32bit in the following files: - core/kernel/ldelf_loader.c - ldelf/include/ldelf.h - ldelf/m
core, ldelf: replace is_arm32 with is_32bit
To refer to 32-bit mode, this commit replace is_arm32 with is_32bit in the following files: - core/kernel/ldelf_loader.c - ldelf/include/ldelf.h - ldelf/main.c
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| #
d8e4ae07 |
| 01-Feb-2023 |
Marouene Boubakri <marouene.boubakri@nxp.com> |
core: kernel: move ldelf_loader.c to core/kernel
Make other architecture implementations benefit from ldelf_loader.c, therefore move it from core/arch/arm/kernel to core/kernel. The header file is a
core: kernel: move ldelf_loader.c to core/kernel
Make other architecture implementations benefit from ldelf_loader.c, therefore move it from core/arch/arm/kernel to core/kernel. The header file is already located outside the arch folder.
Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|