| 728616b2 | 31-Aug-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: tee_entry: fix array out of bounds check in cleanup_shm_refs()
cleanup_shm_refs() can be called with num_params larger than what has been used by copy_in_params(). If num_params is larger than
core: tee_entry: fix array out of bounds check in cleanup_shm_refs()
cleanup_shm_refs() can be called with num_params larger than what has been used by copy_in_params(). If num_params is larger than TEE_NUM_PARAMS copy_in_params() will return an error and cleanup_shm_refs() is called to clean up.
This leads to accessing uint64_t saved_attr[TEE_NUM_PARAMS] in entry_invoke_command() or entry_open_session() out of bounds and possibly also the u[TEE_NUM_PARAMS] array in struct tee_ta_param.
So fix this by capping num_params TEE_NUM_PARAMS in cleanup_shm_refs().
Fixes: b05cd886e06d ("core: enable non-contiguous temporary reference parameters") Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 03e07432 | 28-Sep-2022 |
Valerii Chubar <valerii_chubar@epam.com> |
ta: pkcs11: Add Ed25519 support
Add functionality to generate, import keys, sign/verify for ED25519, ED25519ctx and ED25519ph.
The values for the object identifies originates from: https://www.rfc-
ta: pkcs11: Add Ed25519 support
Add functionality to generate, import keys, sign/verify for ED25519, ED25519ctx and ED25519ph.
The values for the object identifies originates from: https://www.rfc-editor.org/rfc/rfc8420.html A.1. ASN.1 Object for Ed25519
The PKCS#11 Specification: https://docs.oasis-open.org/pkcs11/pkcs11-spec/v3.1/cs01/ pkcs11-spec-v3.1-cs01.pdf
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 0aaad418 | 12-Aug-2022 |
Valerii Chubar <valerii_chubar@epam.com> |
core: crypto: add Ed25519 support
Put in place Ed25519 core functionality and support it for OP-TEE crypto syscalls.
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Signed-off-by: Sergiy Ki
core: crypto: add Ed25519 support
Put in place Ed25519 core functionality and support it for OP-TEE crypto syscalls.
Signed-off-by: Valerii Chubar <valerii_chubar@epam.com> Signed-off-by: Sergiy Kibrik <Sergiy_Kibrik@epam.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| f5411aaf | 17-Aug-2022 |
Judy Wang <wangjudy@microsoft.com> |
core: add CFG_REE_FS_INTEGRITY_RPMB for roll-back protection of REE
If we enable CFG_RPMB_FS and CFG_REE_FS at the same time in optee-os, with tee-supplicant only supports REE, calls from xtest to
core: add CFG_REE_FS_INTEGRITY_RPMB for roll-back protection of REE
If we enable CFG_RPMB_FS and CFG_REE_FS at the same time in optee-os, with tee-supplicant only supports REE, calls from xtest to ree_fs_open() will attempt to access RPMB for roll-back protection, which will fail because tee-supplicant can't access RPMB.
In some platforms, we only want optee-os to support RPMB key provision checking by invoking any RPMB read/writes, but don't care about whether contents could be read/written. The tee-supplicant in these platform is limited to REE only, because there's an existing issue in Linux OS causing kernel drivers failed to support RPMB. So we need an option to prevent applications like xtest to access RPMB when calling ree_fs_open(), but keep the ability to call RPMB fs related apis. When we check the key thru RPMB read. If key is provisioned, tee-supplicant will return TEEC_ERROR_ITEM_NOT_FOUND. If not, optee-os will return TEE_ERROR_STORAGE_NOT_AVAILABLE.
How-tested: execute `xtest -t regression` with optee-os CFG_REE_FS=y and CFG_RPMB_FS=y. optee-client RPMB_EMU=n Many testcases will fail. (ex: case 1004)
Signed-off-by: Judy Wang <wangjudy@microsoft.com> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
show more ...
|
| 20750505 | 02-Aug-2022 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: tee_svc.c: add missing comma
Add missing comma to fix the following error:
$ make -s PLATFORM=vexpress-qemu_armv8a CFG_TA_PAUTH=y CFG_MEMTAG=y core/tee/tee_svc.c:371:9: error: expected ‘}’
core: tee_svc.c: add missing comma
Add missing comma to fix the following error:
$ make -s PLATFORM=vexpress-qemu_armv8a CFG_TA_PAUTH=y CFG_MEMTAG=y core/tee/tee_svc.c:371:9: error: expected ‘}’ before ‘{’ token 371 | { | ^ core/tee/tee_svc.c:280:44: note: to match this ‘{’ 280 | const struct tee_props tee_propset_tee[] = { | ^
Fixes: a0e8ffe9ba8f ("core: add support for MTE") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| adf8325b | 29-Jun-2022 |
Jerome Forissier <jerome.forissier@linaro.org> |
core: crypto: mte: strip tag before calling vm_check_access_rights()
op_attr_bignum_to_user() lacks a call to memtag_strip_tag() before it calls vm_check_access_rights(). This results in the memory
core: crypto: mte: strip tag before calling vm_check_access_rights()
op_attr_bignum_to_user() lacks a call to memtag_strip_tag() before it calls vm_check_access_rights(). This results in the memory buffer not being found and the function returning TEE_ERROR_ACCESS_DENIED.
Test case: xtest pkcs11_1019 on QEMUv8, build command:
make CFG_PKCS11_TA=y CFG_USER_TA_TARGET_pkcs11=ta_arm64 MEMTAG=y run
Fixes: ef142203a36b ("core: syscalls: strip tags from user space pointers") Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 90827a1e | 28-Jun-2022 |
Judy Wang <wangjudy@microsoft.com> |
core: fix TA crash if RPMB key is not provisioned
If optee-os is set with CFG_RPMB_WRITE_KEY=n, returning TEE_ERROR_BAD_STATE will result in TA panic because of exit checks in /lib/libutee/tee_api_o
core: fix TA crash if RPMB key is not provisioned
If optee-os is set with CFG_RPMB_WRITE_KEY=n, returning TEE_ERROR_BAD_STATE will result in TA panic because of exit checks in /lib/libutee/tee_api_objects.c APIs. Returning TEE_ERROR_STORAGE_NOT_AVAILABLE to avoid TA panic and signal TA RPMB is not ready for use, therefore TA could perform error handling.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Judy Wang <wangjudy@microsoft.com>
show more ...
|
| 90040fa4 | 06-May-2022 |
Sohaib ul Hassan <sohaib.ul.hassan@unikie.com> |
core: crypto: add X25519 support
This adds the X25519 core functionality and enables support for Curve25519 key attribute type for OP-TEE crypto syscalls.
Acked-by: Etienne Carriere <etienne.carrie
core: crypto: add X25519 support
This adds the X25519 core functionality and enables support for Curve25519 key attribute type for OP-TEE crypto syscalls.
Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Signed-off-by: Sohaib ul Hassan <sohaib.ul.hassan@unikie.com>
show more ...
|
| ef142203 | 13-Apr-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: syscalls: strip tags from user space pointers
Strips the tags from user space pointers before using them. We're relying on TCR_EL1.TCMA0=1 to make the accesses unchecked.
Acked-by: Jerome For
core: syscalls: strip tags from user space pointers
Strips the tags from user space pointers before using them. We're relying on TCR_EL1.TCMA0=1 to make the accesses unchecked.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| a0e8ffe9 | 04-Apr-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add support for MTE
Adds support for the Armv8.5-A Memory Tagging Extension with CFG_MEMTAG=y.
A memtag.h API is introduced to handle this extension. If CFG_MEMTAG=n the API doesn't add any o
core: add support for MTE
Adds support for the Armv8.5-A Memory Tagging Extension with CFG_MEMTAG=y.
A memtag.h API is introduced to handle this extension. If CFG_MEMTAG=n the API doesn't add any overhead and the behaviour is unchanged. With CFG_MEMTAG=y a check is performed to see if the platform can support MTE and the API is dynamically configured accordingly. This means that it's safe to have CFG_MEMTAG=y even for platforms not supporting MTE. There will be some minimal overhead then, but likely not noticeable.
An entry is also added in the TEE_PROPSET_TEE_IMPLEMENTATION for a u32 property "org.trustedfirmware.optee.cpu.feat_memtag_implemented". The property is set to a non-zero value only if CFG_CORE_MEMTAG is configured and the underlying CPU supports FEAT_MTE.
This commit still only uses the default tag with the value 0 resulting in unchanged pointers when accessing memory. However, all plumbing is in place allowing for instance tagging of the heap in a later commit.
Acked-by: Jerome Forissier <jerome.forissier@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 5695e448 | 19-Apr-2022 |
Sadiq Hussain <sadiq.muchumarri@intel.com> |
core: Fix compile warning in RPMB storage initialization
Fix the below warning when GCC 10.2.0 toolchain is used:
core/tee/tee_rpmb_fs.c:1137:3: warning: ‘dev_info’ may be used uninitialized in thi
core: Fix compile warning in RPMB storage initialization
Fix the below warning when GCC 10.2.0 toolchain is used:
core/tee/tee_rpmb_fs.c:1137:3: warning: ‘dev_info’ may be used uninitialized in this function [-Wmaybe-uninitialized] memcpy(rpmb_ctx->cid, dev_info.cid, RPMB_EMMC_CID_SIZE);
Signed-off-by: Sadiq Hussain <sadiq.muchumarri@intel.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 3176f4d1 | 09-Mar-2022 |
Jerome Forissier <jerome@forissier.org> |
core: crypto: fix key generation for SM2 DSA and SM2 PKE
TEE_GenerateKey() returns TEE_ERROR_BAD_FORMAT when the object type is TEE_TYPE_SM2_DSA_KEYPAIR or TEE_TYPE_SM2_KEP_KEYPAIR. Only TEE_TYPE_SM
core: crypto: fix key generation for SM2 DSA and SM2 PKE
TEE_GenerateKey() returns TEE_ERROR_BAD_FORMAT when the object type is TEE_TYPE_SM2_DSA_KEYPAIR or TEE_TYPE_SM2_KEP_KEYPAIR. Only TEE_TYPE_SM2_PKE_KEYPAIR is accepted, which is clearly wrong as per the GlobalPlatform specification. Fix that by adding the missing entries to syscall_obj_generate_key().
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| c2e89f8d | 09-Mar-2022 |
Jerome Forissier <jerome@forissier.org> |
core: crypto: sm2: remove TEE_ATTR_ECC_CURVE attribute from SM2 keys
SM2 key objects should not have a TEE_ATTR_ECC_CURVE attribute. For example, the GP specification states that TEE_GenerateKey() c
core: crypto: sm2: remove TEE_ATTR_ECC_CURVE attribute from SM2 keys
SM2 key objects should not have a TEE_ATTR_ECC_CURVE attribute. For example, the GP specification states that TEE_GenerateKey() can be called with no attribute for the various SM2 algorithms. The current implementation uses the same attribute templates than generic ECC algorithms, which is wrong. Define specific variants for SM2 so that TEE_ATTR_ECC_CURVE is not required when generating or populating SM2 keys and is not output either by TEE_GetObjectBufferAttribute().
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 8b427282 | 01-Mar-2022 |
Jelle Sels <jelle.sels@arm.com> |
core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_
Some extra memory types will be added. This patch renames all TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next patches ea
core: change TEE_MATTR_CACHE_ to TEE_MATTR_MEM_TYPE_
Some extra memory types will be added. This patch renames all TEE_MATTR_CACHE_ defines to TEE_MATTR_MEM_TYPE_. This will make the next patches easier to understand.
Signed-off-by: Jelle Sels <jelle.sels@arm.com> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| e07514dc | 28-Feb-2022 |
Jerome Forissier <jerome@forissier.org> |
core: storage: do not check object ID buffer when its size is zero
The storage syscalls syscall_storage_obj_open(), syscall_storage_obj_create() and syscall_storage_obj_rename() must not call vm_che
core: storage: do not check object ID buffer when its size is zero
The storage syscalls syscall_storage_obj_open(), syscall_storage_obj_create() and syscall_storage_obj_rename() must not call vm_check_access_rights() on the object ID buffer when its length is zero, because it is a valid case but vm_check_access_rights() rejects such a buffer with TEE_ERROR_ACCESS_DENIED.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 63740eac | 22-Feb-2022 |
Jerome Forissier <jerome@forissier.org> |
core: FS: make dirfile interface accept empty object ID
The TEE Internal Core API specification (v1.3.1) explicitly allows the use of an empty object ID in TEE_RenamePersistentObject(). The text is:
core: FS: make dirfile interface accept empty object ID
The TEE Internal Core API specification (v1.3.1) explicitly allows the use of an empty object ID in TEE_RenamePersistentObject(). The text is:
newObjectID, newObjectIDLen: A buffer containing the new object identifier. The identifier contains arbitrary bytes, including the zero byte. The identifier length SHALL be less than or equal to TEE_OBJECT_ID_MAX_LEN and can be zero.
(note the mention: "and can be zero").
Consequently, the OP-TEE filesystem code needs to accept an empty buffer as a valid object identifier.
The REE FS implementation is not currently compatible with this because a null struct dirfile_entry::oidlen is considered unused (free). In order to differentiate between a free entry and one that represents an object with an empty name, this commit adds a condition on the first byte of struct dirfile_entry::oid. When zero, the structure is free; when non-zero, it is the empty object ID. A new helper function is introduced (is_free()) and used instead of simple tests on !oidlen.
The tee_fs_dirfile_find() function is modified to be able to match the empty object ID. It used to interpret oidlen == 0 as a request to find a free entry; this logic is moved to an new function: tee_fs_dirfile_new().
The RPMB implementation (core/tee/tee_rpmb_fs.c) has no problem because it stores absolute object names including the TA UUID in a FAT structure like so: "/<TA UUID>/<Object ID in hexadecimal>". An empty object ID is therefore not a corner case.
Link: https://github.com/OP-TEE/optee_os/issues/5171 Reported-by: Sadiq Hussain <sadiq.muchumarri@intel.com> Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 453d8327 | 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: change return type for tee_entry_std() TEE_Result
Changes the return type for the function tee_entry_std() to TEE_Result in order to make it independent of optee_smc.h. tee_entry_std() is also
core: change return type for tee_entry_std() TEE_Result
Changes the return type for the function tee_entry_std() to TEE_Result in order to make it independent of optee_smc.h. tee_entry_std() is also called from yielding_call_with_arg() and it doesn't make sense for that function to return values based on the SMC ABI.
With this we're doing an ABI change for FF-A, but that should not make a difference for the driver since that only test for 0 or !0. In addition if !0 is returned the communication has broken down completely so there not much left to recover from. Note that this patch does not require changes in the Linux kernel driver.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| d8158fea | 14-Feb-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: remove references to OPTEE_SMC_SHM_CACHED
Removes references to OPTEE_SMC_SHM_CACHED in architecture independent code, the references are replaces by TEE_MATTR_CACHE_CACHED which is more accur
core: remove references to OPTEE_SMC_SHM_CACHED
Removes references to OPTEE_SMC_SHM_CACHED in architecture independent code, the references are replaces by TEE_MATTR_CACHE_CACHED which is more accurate.
Acked-by: Marouene Boubakri <marouene.boubakri@nxp.com> Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e8a5e425 | 19-Jan-2022 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
core: Add property to check feature PAUTH in TEE property set
Add an entry in TEE_PROPSET_TEE_IMPLEMENTATION for a boolean property org.trustedfirmware.optee.cpu.feat_pauth_implemented. The property
core: Add property to check feature PAUTH in TEE property set
Add an entry in TEE_PROPSET_TEE_IMPLEMENTATION for a boolean property org.trustedfirmware.optee.cpu.feat_pauth_implemented. The property is set true only if CFG_TA_PAUTH is configured and the underlying CPU supports FEAT_PAuth/FEAT_PAuth2.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| b1deb157 | 24-Jan-2022 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: ree_fs_open(): close dirfile on error
Updates ree_fs_open() to close the dirfile on error. This should take care of the rare case were the internal file handle in the dirfile has been closed d
core: ree_fs_open(): close dirfile on error
Updates ree_fs_open() to close the dirfile on error. This should take care of the rare case were the internal file handle in the dirfile has been closed due to an error.
Fixes an error like: E/TC:1 1 Core data-abort at address 0xc0 (translation fault) E/TC:1 1 esr 0x96000006 ttbr0 0x600000e19a020 ttbr1 0x00000000 cidr 0x0 E/TC:1 1 cpu #1 cpsr 0x00000004 E/TC:1 1 x0 00000000000000c0 x1 0000000000000078 E/TC:1 1 x2 000000000e1a0c88 x3 000000000e1a0c28 E/TC:1 1 x4 0000000000000078 x5 000000000e128220 E/TC:1 1 x6 000000000000001f x7 0000000000000000 E/TC:1 1 x8 0000000000000000 x9 0000000000000000 E/TC:1 1 x10 0000000000000000 x11 0000000000000000 E/TC:1 1 x12 0000000000000000 x13 0000000040014f80 E/TC:1 1 x14 0000000000000000 x15 0000000000000000 E/TC:1 1 x16 000000000e12f318 x17 0000000000000000 E/TC:1 1 x18 0000000000000000 x19 0000000000000078 E/TC:1 1 x20 0000000000000000 x21 000000000e1a0c28 E/TC:1 1 x22 00000000ffffffff x23 000000000e1a0c88 E/TC:1 1 x24 000000000e1891c4 x25 000000000e17d1b0 E/TC:1 1 x26 000000000e17de50 x27 000000000e1891c4 E/TC:1 1 x28 0000000000000000 x29 000000000e1a0b90 E/TC:1 1 x30 000000000e128254 elr 000000000e128260 E/TC:1 1 sp_el0 000000000e1a0b90 E/TC:1 1 TEE load address @ 0xe100000 E/TC:1 1 Call stack: E/TC:1 1 0x0e128260 ree_fs_read_primitive at core/tee/tee_ree_fs.c:311 E/TC:1 1 0x0e129324 read_dent at core/tee/fs_dirfile.c:89 E/TC:1 1 0x0e129770 tee_fs_dirfile_find at core/tee/fs_dirfile.c:213 E/TC:1 1 0x0e128f1c set_name at core/tee/tee_ree_fs.c:664 E/TC:1 1 0x0e125954 tee_svc_storage_init_file at core/tee/tee_svc_storage.c:297 E/TC:1 1 0x0e10d514 tee_svc_do_call at core/arch/arm/tee/arch_svc_a64.S:140 E/TC:1 1 0x0e1062ec thread_svc_handler at core/arch/arm/kernel/thread.c:1585 (discriminator 4) E/TC:1 1 0x0e103618 el0_svc at core/arch/arm/kernel/thread_a64.S:651
Acked-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| 766cff40 | 21-Jan-2022 |
Jerome Forissier <jerome@forissier.org> |
core: crypto: TEE_PopulateTransientObject() should check key size
The GlobalPlatform TEE Internal Core API specification specifies the panic reasons for TEE_PopulateTransientObject() as follows: "If
core: crypto: TEE_PopulateTransientObject() should check key size
The GlobalPlatform TEE Internal Core API specification specifies the panic reasons for TEE_PopulateTransientObject() as follows: "If the implementation detects any other error associated with this function that is not explicitly associated with a defined return code for this function.". There is no explicit return code for the case of an attribute that would be an invalid key length for the specified algorithm, but it seems that panicking the TA would be permitted and even desirable in order to prevent other issues with subsequent calls using such a key.
Add a key size check to tee_svc_cryp_obj_populate_type() so that syscall_cryp_obj_populate() will return TEE_ERROR_BAD_PARAMETER when a key of invalid length is supplied. This error code is converted into a panic by TEE_PopulateTransientObject().
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| b20d0295 | 21-Jan-2022 |
Jerome Forissier <jerome@forissier.org> |
core: crypto: DSA key size is given by TEE_ATTR_DSA_PRIME
The size of a DSA key is the size of the prime number (p) and not the size of the subprime (q). Therefore the size indicator flag in the def
core: crypto: DSA key size is given by TEE_ATTR_DSA_PRIME
The size of a DSA key is the size of the prime number (p) and not the size of the subprime (q). Therefore the size indicator flag in the definition of DSA cryptographic object attributes should be associated with TEE_ATTR_DSA_PRIME, not with TEE_ATTR_DSA_SUBPRIME.
Signed-off-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org> Acked-by: Etienne Carriere <etienne.carriere@linaro.org>
show more ...
|
| 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 ...
|
| c2d44948 | 20-Apr-2021 |
Jens Wiklander <jens.wiklander@linaro.org> |
core: add asynchronous notifications
Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top
core: add asynchronous notifications
Adds support for asynchronous notifications from secure world to normal world. This allows a design with a top half and bottom half type of driver where the top half runs in secure interrupt context and a notifications tells normal world to schedule a yielding call to do the bottom half processing.
The protocol is defined in optee_msg.h optee_rpc_cmd.h and optee_smc.h.
A notification consists of a 32-bit value which normal world can retrieve using a fastcall into secure world. OP-TEE is currently only supporting the value 0-63 where 0 has a special meaning. When 0 is sent it means that normal world is supposed to make a yielding call OPTEE_MSG_CMD_DO_BOTTOM_HALF.
The notification framework in OP-TEE defines an interface where drivers can register a callback which is called on each yielding bottom half call.
Notification capability is negotiated with the normal world while it initializes its driver. If both sides supports these notifications then they are enabled.
CFG_CORE_ASYNC_NOTIF_GIC_INTID is added to define the hardware interrupt used to notify normal world. This is added to the DTB in case OP-TEE can is configured with CFG_DT=y. Other cases requires the normal world DTB to be kept in sync with this.
Reviewed-by: Jerome Forissier <jerome@forissier.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|
| e20620bd | 02-Dec-2021 |
Ruchika Gupta <ruchika.gupta@linaro.org> |
core: Add property to check feature BTI in TEE property set
Add an entry in TEE_PROPSET_TEE_IMPLEMENTATION for a boolean property org.trustedfirmware.optee.cpu.feat_bti_implemented. The property is
core: Add property to check feature BTI in TEE property set
Add an entry in TEE_PROPSET_TEE_IMPLEMENTATION for a boolean property org.trustedfirmware.optee.cpu.feat_bti_implemented. The property is set true only if CFG_TA_BTI is configured and the underlying CPU supports FEAT_BTI.
Signed-off-by: Ruchika Gupta <ruchika.gupta@linaro.org> Reviewed-by: Jerome Forissier <jerome@forissier.org> Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>
show more ...
|