| 87a092a7 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: panic() macro accepts zero or one string argument.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Etienne Car
core: panic() macro accepts zero or one string argument.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| d13278b8 | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: remove TEE_ASSERT()
TEE_ASSERT() can be confusing regarding assert() as assert() can be disabled through NDEBUG while TEE_ASSERT() can't. Instead one should explicitly implement "if (cond) { p
core: remove TEE_ASSERT()
TEE_ASSERT() can be confusing regarding assert() as assert() can be disabled through NDEBUG while TEE_ASSERT() can't. Instead one should explicitly implement "if (cond) { panic(); }"
This patch removes several inclusions on tee_common_unpg.h as it used to define TEE_ASSERT() that has been removed.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jen.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| 8ddf5a4e | 23-Jul-2016 |
Etienne Carriere <etienne.carriere@linaro.org> |
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses o
assert/panic: fix misuse of assert/panic
Currently implementation of macro assert() does not expand to a no-op when NDEBUG is defined. This will be done in a later change. Before that, fix misuses of assert() and TEE_ASSERT(): - Correct misplaced assert() that should panic() whatever NDEBUG. - Correct misplaced TEE_ASSERT() that should simply assert().
Also cleanup many inclusions of "assert.h" and few calls of assert().
Signed-off-by: Jens Wiklander <jen.wiklander@linaro.org> Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Etienne Carriere <etienne.carriere@linaro.org> (QEMU)
show more ...
|
| a046599a | 23-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: mask interrupts at assert or panic()
Masks interrupts at assert or panic() to keep the cpu pinned.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklan
core: mask interrupts at assert or panic()
Masks interrupts at assert or panic() to keep the cpu pinned.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 88885202 | 28-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: fix race to allocate secure buffer
Fixes race to allocate secure buffer for TA to TA communication.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander
core: fix race to allocate secure buffer
Fixes race to allocate secure buffer for TA to TA communication.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 70126feb | 15-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: struct tee_ta_session: remove calling_sess
Removes calling_sess from struct tee_ta_session as the information is available via link_tsd instead.
Reviewed-by: Joakim Bech <joakim.bech@linaro.o
core: struct tee_ta_session: remove calling_sess
Removes calling_sess from struct tee_ta_session as the information is available via link_tsd instead.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a07c12b2 | 14-Jun-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: replace tee_ta_set_current_session()
Replace tee_ta_set_current_session() with tee_ta_push_current_session() and tee_ta_pop_current_session() to set and restore the current session in a stack
core: replace tee_ta_set_current_session()
Replace tee_ta_set_current_session() with tee_ta_push_current_session() and tee_ta_pop_current_session() to set and restore the current session in a stack like fashion.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| be715239 | 15-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add CFG_CORE_SANITIZE_UNDEFINED
Adds CFG_CORE_SANITIZE_UNDEFINED to enabled undefined behavior santizer with -fsanitize=undefined as option to compiler with supporting routines in core/kernel/
core: add CFG_CORE_SANITIZE_UNDEFINED
Adds CFG_CORE_SANITIZE_UNDEFINED to enabled undefined behavior santizer with -fsanitize=undefined as option to compiler with supporting routines in core/kernel/ubsan.c.
This option consumes a lot of memory, expect link problems unless pager and debug is disabled.
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 63dc8d4a | 14-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: rename session_is_cancelled()
Renames session_is_cancelled() to tee_ta_session_is_cancelled() and make it available in tee_ta_manager.h to allow other parts of OP-TEE OS to check for cancellat
core: rename session_is_cancelled()
Renames session_is_cancelled() to tee_ta_session_is_cancelled() and make it available in tee_ta_manager.h to allow other parts of OP-TEE OS to check for cancellation of a session.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3cf931e5 | 03-May-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: move tee_ta_manager.c out of arch/arm
Moves most parts of tee_ta_manager.c into core/kernel, keeping only tee_ta_verify_param() in the original file as it uses architecture specific checks.
R
core: move tee_ta_manager.c out of arch/arm
Moves most parts of tee_ta_manager.c into core/kernel, keeping only tee_ta_verify_param() in the original file as it uses architecture specific checks.
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7315b7b4 | 21-Apr-2016 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add interrupt framework
Adds interrupt frameworks and adjusts gic driver to fit in.
Update plat-vexpress and sunxi platforms to initialize gic with slightly modified interface.
Reviewed-by:
core: add interrupt framework
Adds interrupt frameworks and adjusts gic driver to fit in.
Update plat-vexpress and sunxi platforms to initialize gic with slightly modified interface.
Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3276098d | 03-Feb-2016 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused.
core: introduce __maybe_unused
When a variable, parameter or function may or may not be referenced depending on some conditional compilation setting, mark it with __maybe_unused instead of __unused. The goal is to improve code legibility.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 0795afd0 | 27-Nov-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: merge tee_ta_manager{,_unpg}.{c,h}
Merges tee_ta_manager_unpg.h into tee_ta_manager.h and tee_ta_manager_unpg.c into tee_ta_manager.c
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewe
core: merge tee_ta_manager{,_unpg}.{c,h}
Merges tee_ta_manager_unpg.h into tee_ta_manager.h and tee_ta_manager_unpg.c into tee_ta_manager.c
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (QEMU, FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 8b4ed803 | 08-Jan-2016 |
Joakim Bech <joakim.bech@linaro.org> |
Remove unused functions
After finding a set of functions potentially not used anywhere (using gcc -Wl,--print-gc-sections) I did grep'd for those functions and the ones that couldn't be found to be
Remove unused functions
After finding a set of functions potentially not used anywhere (using gcc -Wl,--print-gc-sections) I did grep'd for those functions and the ones that couldn't be found to be used anywhere has been deleted (although utility functions, LibTomCrypt etc hasn't been touched).
Signed-off-by: Joakim Bech <joakim.bech@linaro.org> Tested-by: Joakim Bech <joakim.bech@linaro.org> (QEMU) Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| fe3ccf24 | 30-Nov-2015 |
Jerome Forissier <jerome.forissier@linaro.org> |
libutils: add %pUl format for UUIDs
The debug traces in tee_ta_manager.c do not show the last 8 bytes of the TA UUIDs, which makes the output confusing sometimes. This commit adds support for a new
libutils: add %pUl format for UUIDs
The debug traces in tee_ta_manager.c do not show the last 8 bytes of the TA UUIDs, which makes the output confusing sometimes. This commit adds support for a new printf format for little-endian encoded UUIDs: %pUl, and uses it in tee_ta_manager.c. For example:
TEE_UUID uuid; DMSG("UUID: %pUl", (void *)&uuid);
...will print something like:
[...] UUID: cb3e5ba0-adf1-11e0-998b0002a5d5c51b
The new format is available when using the trace macros or the new functions: snprintk(), vsnprintk() declared in <printk.h>. But, snprintf() and vsnprintf() are not modified in order not to break standard compliance.
This format is taken from the Linux kernel [1].
[1] https://www.kernel.org/doc/Documentation/printk-formats.txt
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| b666b6f2 | 28-Oct-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: arm: thread-safe sessions
Make session handling thread-safe with tee_ta_get_session(), tee_ta_put_session() and tee_ta_unlink_session().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.o
core: arm: thread-safe sessions
Make session handling thread-safe with tee_ta_get_session(), tee_ta_put_session() and tee_ta_unlink_session().
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 68677ce9 | 27-Aug-2015 |
Pascal Brand <pascal.brand@st.com> |
Update types in some functions
- tee_mmu_user_pa2va_helper(): padd_t instead of void * - tee_mmu_check_access_rights(): const context - check tee_time_get_sys_time() succeeded
Reviewed-by: Jens Wik
Update types in some functions
- tee_mmu_user_pa2va_helper(): padd_t instead of void * - tee_mmu_check_access_rights(): const context - check tee_time_get_sys_time() succeeded
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 5147b2ab | 07-Jul-2015 |
Jean-Michel Delorme <jean-michel.delorme@st.com> |
Removing the malloc to handle the temporary copy
Removing the malloc to handle the temporary copy of the params in the tee_dispatch_open_session() function. They are now allocated in the stack to be
Removing the malloc to handle the temporary copy
Removing the malloc to handle the temporary copy of the params in the tee_dispatch_open_session() function. They are now allocated in the stack to be coherent with the tee_dispatch_invoke_command case.
Signed-off-by: Jean-Michel Delorme <jean-michel.delorme@st.com> Reviewed-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| decd2b4d | 30-Apr-2015 |
Pascal Brand <pascal.brand@st.com> |
No output in case of failing OpenSession
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@lin
No output in case of failing OpenSession
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| 096cbcdd | 07-Jul-2015 |
Jean-Michel Delorme <jean-michel.delorme@st.com> |
Align Session handle for generic ta interface entry
TEE session handle is now used by all tee_dispatch_xx function. uint32_t type ID parameter has be removed for the tee_dispatch_close_session() fun
Align Session handle for generic ta interface entry
TEE session handle is now used by all tee_dispatch_xx function. uint32_t type ID parameter has be removed for the tee_dispatch_close_session() function.
Signed-off-by: Jean-Michel Delorme <jean-michel.delorme@st.com> Reviewed-by: Pascal BRAND <pascal.brand@st.com> Reviewed-by: Etienne CARRIERE <etienne.carriere@st.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (STM platform)
show more ...
|
| d87d5ede | 15-Jun-2015 |
Peng Fan <van.freenix@gmail.com> |
core: mm: fix adding integer overflow issue
On ARMv7 platform, it is easy that "base + size" wraps down to 0. For example, base is 0xfc100000, size is 0x3f00000, then base + size is 0. We should use
core: mm: fix adding integer overflow issue
On ARMv7 platform, it is easy that "base + size" wraps down to 0. For example, base is 0xfc100000, size is 0x3f00000, then base + size is 0. We should use the "end" address to do the comparation, but not "end + 1".
This patch also can be used for ARMv8.
Signed-off-by: Peng Fan <van.freenix@gmail.com> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (HiKey 32/64-bit)
show more ...
|
| dbd392c9 | 20-Apr-2015 |
Pascal Brand <pascal.brand@st.com> |
Adding noreturn in _assert_break() definition
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.c
Adding noreturn in _assert_break() definition
Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Signed-off-by: Pascal Brand <pascal.brand@st.com>
show more ...
|
| cbc32826 | 25-Mar-2015 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: bugfix set error origin on bad session id
Sets error origin to TEE_ORIGIN_TEE when session id fails verification.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal
core: bugfix set error origin on bad session id
Sets error origin to TEE_ORIGIN_TEE when session id fails verification.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org>
show more ...
|
| 86ffc420 | 17-Mar-2015 |
SY Chiu <sy.chiu@linaro.org> |
Added new interface in PRNG Hal to inject entropy
- Added add_entropy interface in crypto_ops.prng, and expose new interface tee_prng_add_entropy() for platform vendor to inject entropy. - Injec
Added new interface in PRNG Hal to inject entropy
- Added add_entropy interface in crypto_ops.prng, and expose new interface tee_prng_add_entropy() for platform vendor to inject entropy. - Inject entropy using current timestamp every time when a session is opened or closed.
Signed-off-by: SY Chiu <sy.chiu@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Tested-by: SY Chiu <sy.chiu@linaro.org> (FVP,QEMU) Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU)
show more ...
|
| 79a3c601 | 13-Mar-2015 |
Cedric Chaumont <cedric.chaumont@st.com> |
GP Internal Core API v1.1 : add defines, update type
Note: TEE_DATA_FLAG_OVERWRITE not supported
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@lina
GP Internal Core API v1.1 : add defines, update type
Note: TEE_DATA_FLAG_OVERWRITE not supported
Signed-off-by: Cedric Chaumont <cedric.chaumont@st.com> Reviewed-by: Pascal Brand <pascal.brand@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: James Kung <james.kung@linaro.org> Tested-by: Pascal Brand <pascal.brand@linaro.org> (QEMU platform) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (STM Cannes) Tested-by: Cedric Chaumont <cedric.chaumont@linaro.org> (FVP)
show more ...
|