| #
9c4aaf67 |
| 11-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: make mobj_get_va() more secure
Adds a length parameter to allow mobj_get_va() to check that the entire va range requested is available.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.
core: make mobj_get_va() more secure
Adds a length parameter to allow mobj_get_va() to check that the entire va range requested is available.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
b9651492 |
| 11-Nov-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: reference count struct mobj
The mobj interface is changed to use reference counting of mobjs, the direct mobj_free() call is replaced by mobj_put(). As expected a mobj_get() is also added to h
core: reference count struct mobj
The mobj interface is changed to use reference counting of mobjs, the direct mobj_free() call is replaced by mobj_put(). As expected a mobj_get() is also added to handle multiple references to the same mobj.
This also changes already present reference counting in struct mobj_reg_shm to use the reference counting mechanism now available in struct mobj.
The VM_FLAG_EXCLUSIVE_MOBJ flag is removed since the referenced mobj is put instead when a struct vm_region is removed.
Tested-by: Jerome Forissier <jerome@forissier.org> (HiKey960) Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
e1509d6e |
| 29-Jan-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: check for overflow in msg_param_mobj_from_noncontig()
msg_param_mobj_from_noncontig() does not check that buf_ptr + size does not overflow. As a result, num_pages could be computed small, whil
core: check for overflow in msg_param_mobj_from_noncontig()
msg_param_mobj_from_noncontig() does not check that buf_ptr + size does not overflow. As a result, num_pages could be computed small, while size could be big. Only num_pages will be mapped/registered in the returned mobj. If the caller does not compare mobj->size with required size, it can end up manipulating memory out of the intended region.
Fix the issue by using overflow checking macros.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Bastien Simondi <bsimondi@netflix.com> [1.2] Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
4cdeb627 |
| 19-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: msg_param: remove unused functions
Removes the unused functions msg_param_init_memparam() and msg_param_get_buf_size().
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jero
core: msg_param: remove unused functions
Removes the unused functions msg_param_init_memparam() and msg_param_get_buf_size().
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
cd278f78 |
| 19-Oct-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: simplify shm cookie handling
Simplifies SHM cookie handling by storing the cookie in the mobj instead of putting the burden on the caller. The cookie parameter is dropped from the thread_rpc_*
core: simplify shm cookie handling
Simplifies SHM cookie handling by storing the cookie in the mobj instead of putting the burden on the caller. The cookie parameter is dropped from the thread_rpc_*_payload() functions. All callers of those functions are also updated and unused cookie members of related structs are removed too.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| #
1bb92983 |
| 15-Dec-2017 |
Jerome Forissier <jerome.forissier@linaro.org> |
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] wa
Add SPDX license identifiers
Adds one SPDX-License-Identifier line [1] to each source files that contains license text.
Generated by [2]: spdxify.py --add-spdx optee_os/
The scancode tool [3] was used to double check the license matching code in the Python script. All the licenses detected by scancode are either detected by spdxify.py, or have no SPDX identifier, or are false matches.
Link: [1] https://spdx.org/licenses/ Link: [2] https://github.com/jforissier/misc/blob/f7b56c8/spdxify.py Link: [3] https://github.com/nexB/scancode-toolkit Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| #
b05cd886 |
| 15-Jun-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
core: enable non-contiguous temporary reference parameters
Now, when we can pass list of pages between REE and TEE it is possible to use temporary memory references that are not located in a preallo
core: enable non-contiguous temporary reference parameters
Now, when we can pass list of pages between REE and TEE it is possible to use temporary memory references that are not located in a preallocated shared memory area. By employing OPTEE_MSG_ATTR_NONCONTIG parameter attribute, REE can provide own buffer as a temporary memory reference.
Actually, such parameters are indistinguishable from registered shared memory references. So, when OP-TEE spots temporary memory reference with OPTEE_MSG_ATTR_NONCONTIG attribute, it will create `mobj_reg_shm` for it. After call was handled, it will free that mobj.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP, QEMU v7/v8) Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Juno with and without pager) Tested-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> (Rcar M3)
show more ...
|
| #
e7a8839b |
| 15-Jun-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
ABI change: add OPTEE_MSG_ATTR_NONCONTIG handling
This patch introduces new attribute OPTEE_MSG_ATTR_NONCONTIG to allow Normal World pass arbitrary list of physical pages as a shared buffer.
To rea
ABI change: add OPTEE_MSG_ATTR_NONCONTIG handling
This patch introduces new attribute OPTEE_MSG_ATTR_NONCONTIG to allow Normal World pass arbitrary list of physical pages as a shared buffer.
To read this list of page address two new functions are added: - msg_param_extract_pages() is a helper function that read pages list into provided array
- msg_param_mobj_from_noncontig_param() constructs mobj from provided struct optee_msg_param parameter. This mobj then can be used in various parts of OP-TEE
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| #
50f24313 |
| 07-Mar-2017 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
msg_param: add msg_param.c with helper functions
This patch adds various helper functions to manipulate with parameters passed to/from normal world.
Also it introduces new optee_param type which is
msg_param: add msg_param.c with helper functions
This patch adds various helper functions to manipulate with parameters passed to/from normal world.
Also it introduces new optee_param type which is used to pass long lists of parameters.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (Hikey)
show more ...
|