| /optee_os/core/include/mm/ |
| H A D | tee_mmu_types.h | 90 uint32_t attr; /* TEE_MATTR_* above */ member 104 uint16_t attr; /* TEE_MATTR_* above */ member 135 static inline void mattr_perm_to_str(char *str, size_t size, uint32_t attr) in mattr_perm_to_str() argument 140 str[0] = (attr & TEE_MATTR_UR) ? 'r' : '-'; in mattr_perm_to_str() 141 str[1] = (attr & TEE_MATTR_UW) ? 'w' : '-'; in mattr_perm_to_str() 142 str[2] = (attr & TEE_MATTR_UX) ? 'x' : '-'; in mattr_perm_to_str() 143 str[3] = (attr & TEE_MATTR_PR) ? 'R' : '-'; in mattr_perm_to_str() 144 str[4] = (attr & TEE_MATTR_PW) ? 'W' : '-'; in mattr_perm_to_str() 145 str[5] = (attr & TEE_MATTR_PX) ? 'X' : '-'; in mattr_perm_to_str()
|
| /optee_os/lib/libmbedtls/mbedtls/library/ |
| H A D | psa_crypto_storage.c | 238 const psa_key_attributes_t *attr, in psa_format_key_data_for_storage() argument 247 MBEDTLS_PUT_UINT32_LE(attr->lifetime, storage_format->lifetime, 0); in psa_format_key_data_for_storage() 248 MBEDTLS_PUT_UINT16_LE((uint16_t) attr->type, storage_format->type, 0); in psa_format_key_data_for_storage() 249 MBEDTLS_PUT_UINT16_LE((uint16_t) attr->bits, storage_format->bits, 0); in psa_format_key_data_for_storage() 250 MBEDTLS_PUT_UINT32_LE(attr->policy.usage, storage_format->policy, 0); in psa_format_key_data_for_storage() 251 MBEDTLS_PUT_UINT32_LE(attr->policy.alg, storage_format->policy, sizeof(uint32_t)); in psa_format_key_data_for_storage() 252 MBEDTLS_PUT_UINT32_LE(attr->policy.alg2, storage_format->policy, 2 * sizeof(uint32_t)); in psa_format_key_data_for_storage() 270 psa_key_attributes_t *attr) in psa_parse_key_data_from_storage() argument 307 attr->lifetime = MBEDTLS_GET_UINT32_LE(storage_format->lifetime, 0); in psa_parse_key_data_from_storage() 308 attr->type = MBEDTLS_GET_UINT16_LE(storage_format->type, 0); in psa_parse_key_data_from_storage() [all …]
|
| H A D | psa_crypto_storage.h | 103 psa_status_t psa_save_persistent_key(const psa_key_attributes_t *attr, 133 psa_status_t psa_load_persistent_key(psa_key_attributes_t *attr, 173 const psa_key_attributes_t *attr, 196 psa_key_attributes_t *attr);
|
| H A D | psa_crypto_slot_management.c | 398 mbedtls_svc_key_id_equal(key, slot->attr.id)) { in psa_get_and_lock_key_slot_in_memory() 412 (mbedtls_svc_key_id_equal(key, slot->attr.id))) { in psa_get_and_lock_key_slot_in_memory() 628 (!PSA_KEY_LIFETIME_IS_VOLATILE(slot->attr.lifetime))) { in psa_reserve_free_key_slot() 688 status = psa_load_persistent_key(&slot->attr, in psa_load_persistent_key_into_slot() 699 if (psa_get_se_driver(slot->attr.lifetime, &drv, &drv_context)) { in psa_load_persistent_key_into_slot() 736 MBEDTLS_SVC_KEY_ID_GET_KEY_ID(slot->attr.id))) { in psa_load_builtin_key_into_slot() 742 slot->attr.id, &lifetime, &slot_number); in psa_load_builtin_key_into_slot() 749 psa_set_key_id(&attributes, slot->attr.id); in psa_load_builtin_key_into_slot() 789 slot->attr = attributes; in psa_load_builtin_key_into_slot() 845 (*p_slot)->attr.id = key; in psa_get_and_lock_key_slot() [all …]
|
| /optee_os/core/drivers/firewall/ |
| H A D | stm32_etzpc.c | 169 enum etzpc_decprot_attributes attr __maybe_unused) in sanitize_decprot_config() 177 switch (attr) { in sanitize_decprot_config() 182 decprot_id, etzpc_decprot_strings[attr]); in sanitize_decprot_config() 191 decprot_id, etzpc_decprot_strings[attr]); in sanitize_decprot_config() 206 enum etzpc_decprot_attributes attr) in etzpc_configure_decprot() argument 210 uint32_t masked_decprot = (uint32_t)attr & ETZPC_DECPROT0_MASK; in etzpc_configure_decprot() 216 FMSG("ID : %"PRIu32", config %i", decprot_id, attr); in etzpc_configure_decprot() 218 sanitize_decprot_config(decprot_id, attr); in etzpc_configure_decprot() 349 unsigned int attr = pdata->periph_cfg[n] & PERIPH_PM_ATTR_MASK; in etzpc_pm() local 351 etzpc_configure_decprot(n, (enum etzpc_decprot_attributes)attr); in etzpc_pm() [all …]
|
| /optee_os/lib/libutee/ |
| H A D | tee_api_panic.c | 96 void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count) in __utee_check_attr_in_annotation() argument 99 check_access(ACCESS_R, (void *)attr, sizeof(*attr) * count)); in __utee_check_attr_in_annotation() 102 void __utee_check_gp11_attr_in_annotation(const __GP11_TEE_Attribute *attr, in __utee_check_gp11_attr_in_annotation() argument 107 check_access(ACCESS_R, (void *)attr, sizeof(*attr) * count)); in __utee_check_gp11_attr_in_annotation()
|
| H A D | tee_api_objects.c | 439 void TEE_InitRefAttribute(TEE_Attribute *attr, uint32_t attributeID, in TEE_InitRefAttribute() argument 442 __utee_check_out_annotation(attr, sizeof(*attr)); in TEE_InitRefAttribute() 446 attr->attributeID = attributeID; in TEE_InitRefAttribute() 447 attr->content.ref.buffer = (void *)buffer; in TEE_InitRefAttribute() 448 attr->content.ref.length = length; in TEE_InitRefAttribute() 451 void __GP11_TEE_InitRefAttribute(__GP11_TEE_Attribute *attr, in __GP11_TEE_InitRefAttribute() argument 455 __utee_check_out_annotation(attr, sizeof(*attr)); in __GP11_TEE_InitRefAttribute() 459 attr->attributeID = attributeID; in __GP11_TEE_InitRefAttribute() 460 attr->content.ref.buffer = (void *)buffer; in __GP11_TEE_InitRefAttribute() 461 attr->content.ref.length = length; in __GP11_TEE_InitRefAttribute() [all …]
|
| H A D | tee_api_private.h | 37 void __utee_check_attr_in_annotation(const TEE_Attribute *attr, size_t count); 38 void __utee_check_gp11_attr_in_annotation(const __GP11_TEE_Attribute *attr,
|
| /optee_os/core/tee/ |
| H A D | tee_svc_cryp.c | 676 TEE_Result (*from_user)(void *attr, const void *buffer, size_t size); 677 TEE_Result (*to_user)(void *attr, struct ts_session *sess, 679 TEE_Result (*to_binary)(void *attr, void *data, size_t data_len, 681 bool (*from_binary)(void *attr, const void *data, size_t data_len, 683 TEE_Result (*from_obj)(void *attr, void *src_attr); 684 void (*free)(void *attr); 685 void (*clear)(void *attr); 720 static TEE_Result op_attr_secret_value_from_user(void *attr, const void *buffer, in op_attr_secret_value_from_user() argument 724 struct tee_cryp_obj_secret *key = attr; in op_attr_secret_value_from_user() 736 static TEE_Result op_attr_secret_value_to_user(void *attr, in op_attr_secret_value_to_user() argument [all …]
|
| H A D | entry_std.c | 102 uint32_t attr, struct param_mem *mem) in set_tmem_param() argument 120 if (attr & OPTEE_MSG_ATTR_NONCONTIG) { in set_tmem_param() 199 uint32_t attr; in copy_in_params() local 201 saved_attr[n] = READ_ONCE(params[n].attr); in copy_in_params() 206 attr = saved_attr[n] & OPTEE_MSG_ATTR_TYPE_MASK; in copy_in_params() 207 switch (attr) { in copy_in_params() 214 pt[n] = TEE_PARAM_TYPE_VALUE_INPUT + attr - in copy_in_params() 227 pt[n] = TEE_PARAM_TYPE_MEMREF_INPUT + attr - in copy_in_params() 238 pt[n] = TEE_PARAM_TYPE_MEMREF_INPUT + attr - in copy_in_params() 249 pt[n] = TEE_PARAM_TYPE_MEMREF_INPUT + attr - in copy_in_params() [all …]
|
| /optee_os/core/mm/ |
| H A D | vm.c | 70 if ((prev_reg->attr & TEE_MATTR_SECURE) != in select_va_in_range() 71 (reg->attr & TEE_MATTR_SECURE)) in select_va_in_range() 93 if ((next_reg->attr & TEE_MATTR_SECURE) != in select_va_in_range() 94 (reg->attr & TEE_MATTR_SECURE)) in select_va_in_range() 170 paddr_t pa, size_t size, uint32_t attr) in set_pa_range() argument 176 core_mmu_set_entry(ti, idx, pa, attr); in set_pa_range() 196 set_pa_range(ti, va, pa, sz, r->attr); in set_reg_in_table() 301 uint32_t attr = 0; in vm_map_pad() local 316 attr |= mem_type << TEE_MATTR_MEM_TYPE_SHIFT; in vm_map_pad() 318 attr |= TEE_MATTR_VALID_BLOCK; in vm_map_pad() [all …]
|
| H A D | core_mmu.c | 320 if ((mem_map->map[n].attr & TEE_MATTR_VALID_BLOCK) && in find_map_by_pa() 837 const uint32_t attr = TEE_MATTR_VALID_BLOCK; in core_mmu_type_to_attr() local 847 return attr | TEE_MATTR_SECURE | TEE_MATTR_PRWX | tagged; in core_mmu_type_to_attr() 851 return attr | TEE_MATTR_SECURE | TEE_MATTR_PRX | tagged; in core_mmu_type_to_attr() 854 return attr | TEE_MATTR_SECURE | TEE_MATTR_PR | tagged; in core_mmu_type_to_attr() 861 return attr | TEE_MATTR_SECURE | TEE_MATTR_PRW | tagged; in core_mmu_type_to_attr() 863 return attr | TEE_MATTR_SECURE | TEE_MATTR_PRWX | noncache; in core_mmu_type_to_attr() 866 return attr | TEE_MATTR_PRW | cached; in core_mmu_type_to_attr() 868 return attr | TEE_MATTR_SECURE | TEE_MATTR_PR | cached; in core_mmu_type_to_attr() 870 return attr | TEE_MATTR_SECURE | TEE_MATTR_PRW | cached; in core_mmu_type_to_attr() [all …]
|
| H A D | mobj.c | 86 static bool mobj_phys_matches(struct mobj *mobj, enum buf_is_attr attr) in mobj_phys_matches() argument 93 switch (attr) { in mobj_phys_matches() 102 return attr == a; in mobj_phys_matches() 286 static bool mobj_shm_matches(struct mobj *mobj __unused, enum buf_is_attr attr) in mobj_shm_matches() argument 288 return attr == CORE_MEM_NSEC_SHM || attr == CORE_MEM_NON_SEC; in mobj_shm_matches() 400 enum buf_is_attr attr) in mobj_with_fobj_matches() argument 410 return attr == CORE_MEM_SEC; in mobj_with_fobj_matches()
|
| /optee_os/ta/pkcs11/src/ |
| H A D | serializer.c | 131 struct pkcs11_object_head attr = { }; in serialargs_alloc_get_attributes() local 136 rc = serialargs_get(args, &attr, sizeof(attr)); in serialargs_alloc_get_attributes() 140 rc = alloc_and_get(args, orig_next, &attr, sizeof(attr), &p, in serialargs_alloc_get_attributes() 141 attr.attrs_size); in serialargs_alloc_get_attributes()
|
| H A D | attributes.h | 117 void **attr, uint32_t *attr_size, size_t *count); 159 void *attr, uint32_t *attr_size); 204 uint32_t *attr) in get_u32_attribute() argument 207 enum pkcs11_rc rc = get_attribute(head, attribute, attr, &size); in get_u32_attribute()
|
| H A D | pkcs11_attributes.c | 204 void *attr = NULL; in pkcs11_import_object_boolprop() local 210 attr = pkcs11_object_default_boolprop(attribute); in pkcs11_import_object_boolprop() 211 if (!attr) in pkcs11_import_object_boolprop() 214 attr = &bbool; in pkcs11_import_object_boolprop() 218 return add_attribute(out, attribute, attr, sizeof(uint8_t)); in pkcs11_import_object_boolprop() 1613 #define DMSG_BAD_BBOOL(attr, proc, head) \ argument 1615 uint32_t __maybe_unused _attr = (attr); \ 1879 char *attr = NULL; in parent_key_complies_allowed_processings() local 1886 (void *)&attr, &size); in parent_key_complies_allowed_processings() 1895 TEE_MemMove(&proc, attr, sizeof(uint32_t)); in parent_key_complies_allowed_processings() [all …]
|
| /optee_os/core/arch/riscv/mm/ |
| H A D | core_mmu_arch.c | 221 static uint8_t mattr_to_pte_bits(unsigned level __maybe_unused, uint32_t attr) in mattr_to_pte_bits() argument 225 if (attr & TEE_MATTR_TABLE) in mattr_to_pte_bits() 228 if (attr & TEE_MATTR_VALID_BLOCK) in mattr_to_pte_bits() 231 if (attr & TEE_MATTR_UR) in mattr_to_pte_bits() 233 if (attr & TEE_MATTR_UW) in mattr_to_pte_bits() 235 if (attr & TEE_MATTR_UX) in mattr_to_pte_bits() 238 if (attr & TEE_MATTR_PR) in mattr_to_pte_bits() 240 if (attr & TEE_MATTR_PW) in mattr_to_pte_bits() 242 if (attr & TEE_MATTR_PX) in mattr_to_pte_bits() 245 if (attr & (TEE_MATTR_UR | TEE_MATTR_PR)) in mattr_to_pte_bits() [all …]
|
| /optee_os/core/arch/arm/mm/ |
| H A D | core_mmu_v7.c | 389 static uint32_t mattr_to_texcb(uint32_t attr) in mattr_to_texcb() argument 392 return (attr >> TEE_MATTR_MEM_TYPE_SHIFT) & TEE_MATTR_MEM_TYPE_MASK; in mattr_to_texcb() 452 static uint32_t mattr_to_desc(unsigned level, uint32_t attr) in mattr_to_desc() argument 455 uint32_t a = attr; in mattr_to_desc() 609 paddr_t pa, uint32_t attr) in core_mmu_set_entry_primitive() argument 612 uint32_t desc = mattr_to_desc(level, attr); in core_mmu_set_entry_primitive() 651 uint32_t attr; in core_mmu_entry_to_finer_grained() local 663 attr = desc_to_mattr(1, *entry); in core_mmu_entry_to_finer_grained() 670 return secure == (bool)(attr & TEE_MATTR_SECURE); in core_mmu_entry_to_finer_grained() 674 if (attr && secure != (bool)(attr & TEE_MATTR_SECURE)) in core_mmu_entry_to_finer_grained() [all …]
|
| H A D | tee_pager.c | 432 static void tblidx_get_entry(struct tblidx tblidx, paddr_t *pa, uint32_t *attr) in tblidx_get_entry() argument 436 pa, attr); in tblidx_get_entry() 439 static void tblidx_set_entry(struct tblidx tblidx, paddr_t pa, uint32_t attr) in tblidx_set_entry() argument 443 pa, attr); in tblidx_set_entry() 568 uint32_t attr = TEE_MATTR_VALID_BLOCK | TEE_MATTR_SECURE | in pager_add_alias_page() local 576 core_mmu_set_entry(ti, idx, pa, attr); in pager_add_alias_page() 696 uint32_t attr = TEE_MATTR_VALID_BLOCK | TEE_MATTR_SECURE | in get_region_mattr() local 700 return attr; in get_region_mattr() 785 uint32_t attr = 0; in map_pgts() local 790 core_mmu_get_entry(&dir_info, idx, &pa, &attr); in map_pgts() [all …]
|
| /optee_os/core/include/kernel/ |
| H A D | msg_param.h | 71 static inline bool msg_param_attr_is_tmem(uint64_t attr) in msg_param_attr_is_tmem() argument 73 switch (attr & OPTEE_MSG_ATTR_TYPE_MASK) { in msg_param_attr_is_tmem()
|
| /optee_os/lib/libmbedtls/mbedtls/include/mbedtls/ |
| H A D | debug.h | 55 #define MBEDTLS_SSL_DEBUG_ECDH(level, ecdh, attr) \ argument 56 mbedtls_debug_printf_ecdh(ssl, level, __FILE__, __LINE__, ecdh, attr) 67 #define MBEDTLS_SSL_DEBUG_ECDH(level, ecdh, attr) do { } while (0) argument
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | thread_optee_abi.c | 422 param->attr = tpm->attr - THREAD_PARAM_ATTR_MEMREF_IN + in set_rmem() 444 param->attr = tpm->attr - THREAD_PARAM_ATTR_MEMREF_IN + in set_tmem() 494 switch (params[n].attr) { in get_rpc_arg() 496 arg->params[n].attr = OPTEE_MSG_ATTR_TYPE_NONE; in get_rpc_arg() 501 arg->params[n].attr = params[n].attr - in get_rpc_arg() 539 switch (params[n].attr) { in get_rpc_arg_res() 621 if (arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT && in get_rpc_alloc_res() 622 arg->params[0].attr != (OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in get_rpc_alloc_res() 632 if (arg->params[0].attr == OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT) in get_rpc_alloc_res()
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | thread_optee_smc.c | 421 param->attr = tpm->attr - THREAD_PARAM_ATTR_MEMREF_IN + in set_rmem() 443 param->attr = tpm->attr - THREAD_PARAM_ATTR_MEMREF_IN + in set_tmem() 493 switch (params[n].attr) { in get_rpc_arg() 495 arg->params[n].attr = OPTEE_MSG_ATTR_TYPE_NONE; in get_rpc_arg() 500 arg->params[n].attr = params[n].attr - in get_rpc_arg() 538 switch (params[n].attr) { in get_rpc_arg_res() 620 if (arg->params[0].attr != OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT && in get_rpc_alloc_res() 621 arg->params[0].attr != (OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT | in get_rpc_alloc_res() 631 if (arg->params[0].attr == OPTEE_MSG_ATTR_TYPE_TMEM_OUTPUT) in get_rpc_alloc_res()
|
| /optee_os/core/drivers/ |
| H A D | tzc380.c | 180 void tzc_configure_region(uint8_t region, vaddr_t region_base, uint32_t attr) in tzc_configure_region() argument 195 tzc_write_region_attributes(tzc.base, region, attr); in tzc_configure_region() 198 attr & TZC_ATTR_SP_MASK); in tzc_configure_region() 221 int tzc_auto_configure(vaddr_t addr, vaddr_t size, uint32_t attr, in tzc_auto_configure() argument 254 attr); in tzc_auto_configure() 281 mask | attr); in tzc_auto_configure()
|
| /optee_os/core/arch/arm/plat-imx/ |
| H A D | tzc380.c | 32 static int imx_tzc_auto_configure(vaddr_t addr, vaddr_t rsize, uint32_t attr, in imx_tzc_auto_configure() argument 47 return tzc_auto_configure(addr_imx, rsize, attr, region); in imx_tzc_auto_configure()
|