| 33035005 | 04-Apr-2019 |
Etienne Carriere <etienne.carriere@linaro.org> |
build: remove pedantic from build directives
This change removes -pedantic from the build directive from all warning build level. The rational is that OP-TEE OS package no longer supports being buil
build: remove pedantic from build directives
This change removes -pedantic from the build directive from all warning build level. The rational is that OP-TEE OS package no longer supports being built in pedantic mode allowing now use of implementation sequence that are rejected in pedantic mode, for example using = { } for initializing structured local variables in a structure agnostic way which OP-TEE OS community as agreed to use.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 77327d7a | 15-Dec-2017 |
Edison Ai <edison.ai@arm.com> |
libmbedtls: support mbedTLS in kernel mode
Initial step of mbedtls cryptos integration. Directory created and interface file is drafted. All function interfaces are set to "not supported". The mbedt
libmbedtls: support mbedTLS in kernel mode
Initial step of mbedtls cryptos integration. Directory created and interface file is drafted. All function interfaces are set to "not supported". The mbedtls can be selected by specifying build flags "CFG_CRYPTOLIB_NAME=mbedtls" and "CFG_CRYPTOLIB_DIR=lib/libmbedtls"
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Edison Ai <edison.ai@arm.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 471ce4b6 | 25-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Move CFG_CORE_MBEDTLS_MPI init to mk/config.mk
Moves default assignment of CFG_CORE_MBEDTLS_MPI into mk/config.mk
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklan
Move CFG_CORE_MBEDTLS_MPI init to mk/config.mk
Moves default assignment of CFG_CORE_MBEDTLS_MPI into mk/config.mk
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 68689d86 | 25-Mar-2019 |
Jens Wiklander <jens.wiklander@linaro.org> |
Move CFG_CRYPTOLIB_{NAME,DIR} init to mk/config.mk
Moves default initialization of CFG_CRYPTOLIB_NAME and CFG_CRYPTOLIB_DIR to mk/config.mk.
Only assigns default y to CFG_CRYPTO_RSASSA_NA1 in case
Move CFG_CRYPTOLIB_{NAME,DIR} init to mk/config.mk
Moves default initialization of CFG_CRYPTOLIB_NAME and CFG_CRYPTOLIB_DIR to mk/config.mk.
Only assigns default y to CFG_CRYPTO_RSASSA_NA1 in case CFG_CRYPTOLIB_NAME == tomcrypt.
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 7dfff131 | 20-Dec-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: user_ta: implement ASLR for TAs
Introduces CFG_TA_ASLR to enable Address Space Layout Randomization of Trusted Applications. ASLR makes the exploitation of memory corruption vulnerabilities ha
core: user_ta: implement ASLR for TAs
Introduces CFG_TA_ASLR to enable Address Space Layout Randomization of Trusted Applications. ASLR makes the exploitation of memory corruption vulnerabilities harder. The feature is disabled by default except for the configurations I could test (QEMU and HiKey960). When CFG_TA_ASLR=y, the stack and subsequent ELF file(s) needed by the TA are mapped into the user VA space with a random offset comprised between CFG_TA_ASLR_MIN_OFFSET_PAGES and CFG_TA_ASLR_MAX_OFFSET_PAGES pages (that is between 0 and 128 pages by default).
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Tested-by: Jerome Forissier <jerome.forissier@linaro.org> (QEMU, HiKey960) Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 64718c93 | 29-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Allow building libutils etc. as shared libraries
When CFG_ULIBS_SHARED=y (default n), build libutils, libmpa/libmbedtls and libutee as shared libraries (.so). The static archives (.a) are still prod
Allow building libutils etc. as shared libraries
When CFG_ULIBS_SHARED=y (default n), build libutils, libmpa/libmbedtls and libutee as shared libraries (.so). The static archives (.a) are still produced. The linker uses shared libraries by default when present so TAs just need to be re-built to use the shared libraries.
For the time being, in-tree TAs are always linked statically for practical reasons. Indeed, in-tree TAs (such as ta/avb) are likely to be used as "early TAs". If such a TA was linked against shared libraries, then those libraries would need to be installed in the "early TA" area, too. While this works fine technically, it requires some more steps in the Makefiles to make sure the proper dependencies are installed and also it would mean that those libraries take precedence over the ones potentially installed in the REE FS etc. In other words, it would raise questions that we do not want nor need to address now.
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 ...
|
| e59b134d | 29-May-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
mk/lib.mk: add support for producing shared user libraries
This commit adds the infrastructure to build libutils, libmpa/ libmbedtls etc. as shared objects (.so).
Signed-off-by: Jerome Forissier <j
mk/lib.mk: add support for producing shared user libraries
This commit adds the infrastructure to build libutils, libmpa/ libmbedtls etc. as shared objects (.so).
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 ...
|
| 7db24ad6 | 07-Feb-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: REE FS TAs: add option to verify signature before processing
Adds configuration flag CFG_REE_FS_TA_BUFFERED, default enabled.
A new TA store is introduced which depends on the TEE FS TA store
core: REE FS TAs: add option to verify signature before processing
Adds configuration flag CFG_REE_FS_TA_BUFFERED, default enabled.
A new TA store is introduced which depends on the TEE FS TA store to load the whole binary into a temporary buffer in secure DDR and authenticate it before being processed further.
This reduces the attack surface of the TEE core in case of a vulnerability in the ELF loader, at the expense of increased memory usage at load time.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reported-by: Bastien Simondi <bsimondi@netflix.com> [3.6] Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 77cb2a4d | 06-Feb-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
mk/config.mk: remove untrue comment
The comment stating that the REE filesystem is the only possible storage to load Trusted Applications from is not true anymore. As described in documentation/opte
mk/config.mk: remove untrue comment
The comment stating that the REE filesystem is the only possible storage to load Trusted Applications from is not true anymore. As described in documentation/optee_design.md, two other options are possible (early TAs and secure storage). Therefore, remove the comment.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| c4e8be26 | 30-May-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
virt: add virtualization subsystem
This patch adds virtualization framework to OP-TEE.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> |
| 15216d4d | 06-Feb-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
virt: add nexus memory area
This patch is the first in series of patches that split OP-TEE RW memory into two regions: nexus memory and TEE memory. Nexus memory will be always mapped and it will be
virt: add nexus memory area
This patch is the first in series of patches that split OP-TEE RW memory into two regions: nexus memory and TEE memory. Nexus memory will be always mapped and it will be used to store all data that is vital for OP-TEE core and is not bound to virtual guests.
TEE memory is a memory that holds data specific for certain guest. There will be TEE memory bank for every guest and it will be mapped into OP-TEE address space only during call from that guest.
This patch adds nexus memory and moves stacks into it. Also it provides __nex_bss and __nex_data macros, so one can easily set right section for a variable.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 386fc264 | 05-Feb-2018 |
Volodymyr Babchuk <vlad.babchuk@gmail.com> |
bget_malloc: add nex_malloc pool
If virtualization enabled, this pool will be used to allocate memory for OP-TEE nexus needs. Without virtualization, generic malloc pool will be used.
Signed-off-by
bget_malloc: add nex_malloc pool
If virtualization enabled, this pool will be used to allocate memory for OP-TEE nexus needs. Without virtualization, generic malloc pool will be used.
Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 3ec2cabc | 28-Jan-2019 |
Victor Chong <victor.chong@linaro.org> |
mk/aosp_optee.mk: remove cp -u option
AOSP's Toybox's version of cp doesn't support the -u option
Signed-off-by: Victor Chong <victor.chong@linaro.org> Signed-off-by: Yongqin Liu <yongqin.liu@linar
mk/aosp_optee.mk: remove cp -u option
AOSP's Toybox's version of cp doesn't support the -u option
Signed-off-by: Victor Chong <victor.chong@linaro.org> Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org> Reviewed-by: Joakim Bech <joakim.bech@linaro.org>
show more ...
|
| 8bd53f40 | 18-Jan-2019 |
Jerome Forissier <jerome.forissier@linaro.org> |
Update revision for release tag 3.4.0-rc1
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> |
| 0b611081 | 07-Jan-2019 |
Sumit Garg <sumit.garg@linaro.org> |
core: pta: Add device pseudo TA
This pseudo TA enumerates OP-TEE pseudo TAs which can act as devices/ services for Linux TEE bus driver. For differentiation of such devices, added TA_FLAG_DEVICE_ENU
core: pta: Add device pseudo TA
This pseudo TA enumerates OP-TEE pseudo TAs which can act as devices/ services for Linux TEE bus driver. For differentiation of such devices, added TA_FLAG_DEVICE_ENUM optional flag in pseudo TA header.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 24d49094 | 17-Dec-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Document CFG_USER_TA_TARGETS and CFG_USER_TA_TARGET_<ta-name>
Document the configuration flags that controls the target architecture for user mode libraries and in-tree TAs.
Signed-off-by: Jerome F
Document CFG_USER_TA_TARGETS and CFG_USER_TA_TARGET_<ta-name>
Document the configuration flags that controls the target architecture for user mode libraries and in-tree TAs.
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 ...
|
| dc701d99 | 14-Dec-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
Introduce CFG_USER_TA_TARGETS to select user mode architecture(s)
This change introduces CFG_USER_TA_TARGETS to allow the configuration directives to select the architectures for which userspace TA
Introduce CFG_USER_TA_TARGETS to select user mode architecture(s)
This change introduces CFG_USER_TA_TARGETS to allow the configuration directives to select the architectures for which userspace TA and TA libraries shall be built. The only use case for the moment is to be able to build only 32 or 64-bit libraries and TAs when the platform would otherwise support both 32 and 64-bit. See the example below.
If CFG_USER_TA_TARGETS is undefined or empty, all the architectures supported by the platform are built.
If CFG_USER_TA_TARGETS contains an unsupported value, the build will report an error.
Examples:
$ make PLATFORM=hikey CFG_ARM64_core=y # Builds both 32 and 64-bit userspace $ make PLATFORM=hikey CFG_ARM64_core=y \ CFG_USER_TA_TARGETS="ta_arm32 ta_arm64" # Same as above $ make PLATFORM=hikey CFG_ARM64_core=y CFG_USER_TA_TARGETS=ta_arm32 # Builds only 32-bit userspace
Suggested-by: Etienne Carriere <etienne.carriere@linaro.org> 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 ...
|
| 0a3ad9b6 | 19-Nov-2018 |
Bryan O'Donoghue <bryan.odonoghue@linaro.org> |
core: generic_boot: Add add_dt_overlay_fragment()
This patch adds a dt routine add_dt_overlay_fragment(). This purpose of which is to encapsulate the dynamic FDT node entries OPTEE provides inside o
core: generic_boot: Add add_dt_overlay_fragment()
This patch adds a dt routine add_dt_overlay_fragment(). This purpose of which is to encapsulate the dynamic FDT node entries OPTEE provides inside of a
fragment@0 { target-path = "/"; __overlay__ { /* OPTEE nodes go here */ }; };
A subsequent set of patches will wrapper up existing dynamic OPTEE nodes
- /firmware/optee - /psci - /reserved/memory optee@0xaddress
Once done it will be possible for a DTB in memory to be populated with OPTEE fragments and for a subsequent bootloader to merge the OPTEE populated overlay into a DTB loaded by a later stage.
if CFG_EXTERNAL_DTB_OVERLAY is not defined then this code has no effect.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d3353b42 | 22-Nov-2018 |
Jens Wiklander <jens.wiklander@linaro.org> |
mk/compile.mk: define __FILE_ID__ for all files
Defines __FILE_ID__ with a unique name of the file being compiled. Useful to create globally unique variables.
Acked-by: Etienne Carriere <etienne.ca
mk/compile.mk: define __FILE_ID__ for all files
Defines __FILE_ID__ with a unique name of the file being compiled. Useful to create globally unique variables.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c95b9511 | 23-Nov-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: embedded secure device tree
This change introduces configurations CFG_EMDED_DTB and CFG_EMBED_DTB_SOURCE_FILE. When CFG_EMDED_DTB=y a device tree blob (DTB) is embedded in a read-only section
core: embedded secure device tree
This change introduces configurations CFG_EMDED_DTB and CFG_EMBED_DTB_SOURCE_FILE. When CFG_EMDED_DTB=y a device tree blob (DTB) is embedded in a read-only section of the core based on an in-tree device tree source (DTS) file.
CFG_EMBED_DTS_SOURCE_FILE defines the relative path of the target device in core/arch/$(ARCH)/dts.
Non empty CFG_EMBED_DTS_SOURCE_FILE content implies CFG_EMBED_DTB=y. CFG_EMBED_DTB=y mandates CFG_EMBED_DTS_SOURCE_FILE definition. CFG_EMDED_DTB=y mandates CFG_DT=y.
Since the embedded DTB is read-only, core do not attempt to modify it adding information such as OP-TEE resources nodes and properties. Core still get generic information such as system memory address range and debug console configuration from the embedded DTB.
Documentation includes a DT section in the OP-TEE design description.
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| c828ecea | 23-Nov-2018 |
Etienne Carriere <etienne.carriere@linaro.org> |
core: helper for device tree compilation
Add helper function gen-dtb-file in the build sequence. It generates a DTB file from input DTS file. The DTS file is preprocessed with CPP before being compi
core: helper for device tree compilation
Add helper function gen-dtb-file in the build sequence. It generates a DTB file from input DTS file. The DTS file is preprocessed with CPP before being compiled using the device tree compiler (DTC).
Signed-off-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b31756b3 | 15-Nov-2018 |
Jerome Forissier <jerome.forissier@linaro.org> |
lib.mk: centralize profiling flag (-pg)
Code cleanup, no functional change. This commit avoids the duplication of the -pg flag in the library makefiles.
Signed-off-by: Jerome Forissier <jerome.fori
lib.mk: centralize profiling flag (-pg)
Code cleanup, no functional change. This commit avoids the duplication of the -pg flag in the library makefiles.
Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 017dfaf8 | 13-Nov-2018 |
Gabor Szekely <szvgabor@gmail.com> |
mk/config.mk: default enable CFG_CRYPTO_RSASSA_NA1
Enable the TEE_ALG_RSASSA_PKCS1_V1_5 extension by default.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Gabor Szekely <
mk/config.mk: default enable CFG_CRYPTO_RSASSA_NA1
Enable the TEE_ALG_RSASSA_PKCS1_V1_5 extension by default.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Gabor Szekely <szvgabor@gmail.com>
show more ...
|
| 3f58e4ec | 05-Nov-2018 |
Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com> |
trace levels: Redefine TRACE_MIN level to 0
The global `trace_level` session-wise indicator which is set by `trace_set_level()` [1], could get a wrong value in case of an input `level` set to 0, mea
trace levels: Redefine TRACE_MIN level to 0
The global `trace_level` session-wise indicator which is set by `trace_set_level()` [1], could get a wrong value in case of an input `level` set to 0, meaning that all logs need to be disabled by user define `CFG_TEE_TA_LOG_LEVEL=0` when building TA applications.
This inconsistency is caused by a rather wrong value of `TRACE_MIN` low boundary value set to 1. According to [1] `trace level` will be set to `TRACE_MAX` (4) in case input level is smaller than `TRACE_MIN` and larger than `TRACE_MAX`. In the scenario when the needed log level is 0, `trace level` would be set to `TRACE_MAX` and will cause a lot of flow log level information dumped by trace functions/macros that are using `trace_printf()` primitive.
This patch sets the `TRACE_MIN` to 0 in order to assure a proper trace level setting and completely disable all logs in case `CFG_TEE_TA_LOG_LEVEL=0`.
[1] void trace_set_level(int level) { if (((int)level >= TRACE_MIN) && (level <= TRACE_MAX)) trace_level = level; else trace_level = TRACE_MAX; }
Acked-by: Christoph Gellner <cgellner@de.adit-jv.com> Signed-off-by: Ovidiu Mihalachi <ovidiu_mihalachi@mentor.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b2c322ae | 29-Oct-2018 |
Yongqin Liu <yongqin.liu@linaro.org> |
mk/aosp_optee.mk: use prebuilt make command
The host side make command is disallowed by the Android build system on AOSP master [1]. Using it anyway causes the following build error:
"make" is no
mk/aosp_optee.mk: use prebuilt make command
The host side make command is disallowed by the Android build system on AOSP master [1]. Using it anyway causes the following build error:
"make" is not allowed to be used.
See [2] for more information.
Link: [1] https://android-review.googlesource.com/c/platform/build/soong/+/796565 Link: [2] https://android.googlesource.com/platform/build/+/master/Changes.md#PATH_Tools
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
show more ...
|