History log of /optee_os/core/include/kernel/mutex.h (Results 1 – 6 of 6)
Revision Date Author Comments
# 956c2d50 12-Jun-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: fix race condition on TA/PTA/StMM context loading

Fix race condition on creation of a context for single instance TAs,
PTAs or StMM application. Such race condition could occur and lead to
dup

core: fix race condition on TA/PTA/StMM context loading

Fix race condition on creation of a context for single instance TAs,
PTAs or StMM application. Such race condition could occur and lead to
duplicated contexts if connected close enough that they are created
after tee_ta_init_session() calls tee_ta_init_session_with_context()
and before the context are added in the centralized context list.

This is realized by keeping tee_ta_mutex held while tee_ctxes list is
looked up for matching a context or a new context is added into that
list with its .is_initializing field activated. For that purpose
user TA and StMM application initialization function are split in
2 functions, the 2nd one used to finalizes the context creation
started in the 1st function.

By the way, add inline description comments and fix indentation issues
in uaer_ta.h and remove the inline comment in pseudo_ta.c that refers
to TA loading whereas the function relates to PTA contexts creation.

Closes: https://github.com/OP-TEE/optee_os/issues/6801
Suggested-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 30730d67 13-Jun-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: add mutex_is_locked() helper function

Add mutex_is_locked() helper function to return whether a mutex is
locked or not. This helper function must be use with care since it
does not guarantee t

core: add mutex_is_locked() helper function

Add mutex_is_locked() helper function to return whether a mutex is
locked or not. This helper function must be use with care since it
does not guarantee that the mutex is held by the executing thread.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 7921973c 05-May-2024 Etienne Carriere <etienne.carriere@foss.st.com>

core: kernel: use explicit unsigned int type in condvar

Replace unsigned with unsigned int as type of struct condvar::spin_lock.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Revie

core: kernel: use explicit unsigned int type in condvar

Replace unsigned with unsigned int as type of struct condvar::spin_lock.

Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...


# ea413ca5 31-Jan-2024 Gavin Liu <gavin.liu@mediatek.com>

core: mutex: add support timeout condvar

Add support timeout condvar based on timeout notify

Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org

core: mutex: add support timeout condvar

Add support timeout condvar based on timeout notify

Signed-off-by: Gavin Liu <gavin.liu@mediatek.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# d50fee03 16-Oct-2023 Etienne Carriere <etienne.carriere@foss.st.com>

core: prefix header file guard names with __

Improves header files guard names consistency by using a __ prefix
where missing.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by:

core: prefix header file guard names with __

Improves header files guard names consistency by using a __ prefix
where missing.

Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>

show more ...


# 51f49692 01-Mar-2021 Marouene Boubakri <marouene.boubakri@nxp.com>

core: mutex: mutex is abstract pull it from arch folder

This commit moves mutex* and wait_queue* from arch folder to core/kernel
to make it architecture-independent.

Signed-off-by: Marouene Boubakr

core: mutex: mutex is abstract pull it from arch folder

This commit moves mutex* and wait_queue* from arch folder to core/kernel
to make it architecture-independent.

Signed-off-by: Marouene Boubakri <marouene.boubakri@nxp.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>

show more ...