| /optee_os/core/kernel/ |
| H A D | user_ta.c | 153 struct user_ta_ctx *utc = to_user_ta_ctx(session->ctx); in user_ta_enter() local 165 res = vm_map_param(&utc->uctx, ta_sess->param, param_va); in user_ta_enter() 174 usr_stack = utc->uctx.stack_ptr; in user_ta_enter() 187 utc->uctx.entry_func, utc->uctx.is_32bit, in user_ta_enter() 188 &utc->ta_ctx.panicked, in user_ta_enter() 189 &utc->ta_ctx.panic_code); in user_ta_enter() 191 thread_user_clear_vfp(&utc->uctx); in user_ta_enter() 193 if (utc->ta_ctx.panicked) { in user_ta_enter() 196 utc->ta_ctx.panic_code); in user_ta_enter() 217 vm_clean_param(&utc->uctx); in user_ta_enter() [all …]
|
| H A D | tee_ta_manager.c | 1053 struct user_ta_ctx *utc = NULL; in tee_ta_gprof_sample_pc() local 1064 utc = to_user_ta_ctx(s->ctx); in tee_ta_gprof_sample_pc() 1065 res = vm_check_access_rights(&utc->uctx, in tee_ta_gprof_sample_pc()
|
| /optee_os/core/tee/ |
| H A D | tee_obj.c | 15 void tee_obj_add(struct user_ta_ctx *utc, struct tee_obj *o) in tee_obj_add() argument 17 TAILQ_INSERT_TAIL(&utc->objects, o, link); in tee_obj_add() 20 TEE_Result tee_obj_get(struct user_ta_ctx *utc, vaddr_t obj_id, in tee_obj_get() argument 25 TAILQ_FOREACH(o, &utc->objects, link) { in tee_obj_get() 34 void tee_obj_close(struct user_ta_ctx *utc, struct tee_obj *o) in tee_obj_close() argument 36 TAILQ_REMOVE(&utc->objects, o, link); in tee_obj_close() 46 void tee_obj_close_all(struct user_ta_ctx *utc) in tee_obj_close_all() argument 48 struct tee_obj_head *objects = &utc->objects; in tee_obj_close_all() 51 tee_obj_close(utc, TAILQ_FIRST(objects)); in tee_obj_close_all()
|
| H A D | tee_svc_storage.c | 42 static TEE_Result tee_svc_storage_get_enum(struct user_ta_ctx *utc, in tee_svc_storage_get_enum() argument 48 TAILQ_FOREACH(e, &utc->storage_enums, link) { in tee_svc_storage_get_enum() 57 static TEE_Result tee_svc_close_enum(struct user_ta_ctx *utc, in tee_svc_close_enum() argument 60 if (e == NULL || utc == NULL) in tee_svc_close_enum() 63 TAILQ_REMOVE(&utc->storage_enums, e, link); in tee_svc_close_enum() 76 static void remove_corrupt_obj(struct user_ta_ctx *utc, struct tee_obj *o) in remove_corrupt_obj() argument 79 if (!(utc->ta_ctx.flags & TA_FLAG_DONT_CLOSE_HANDLE_ON_CORRUPT_OBJECT)) in remove_corrupt_obj() 80 tee_obj_close(utc, o); in remove_corrupt_obj() 174 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_storage_obj_open() local 214 tee_obj_add(utc, o); in syscall_storage_obj_open() [all …]
|
| H A D | tee_svc.c | 586 static TEE_Result utee_param_to_param(struct user_ta_ctx *utc, in utee_param_to_param() argument 629 res = vm_check_access_rights(&utc->uctx, flags, a, b); in utee_param_to_param() 663 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in tee_svc_copy_param() local 679 res = vm_check_access_rights(&utc->uctx, flags, in tee_svc_copy_param() 684 res = utee_param_to_param(utc, param, callee_params); in tee_svc_copy_param() 711 if (vm_buf_is_inside_um_private(&utc->uctx, va, s)) in tee_svc_copy_param() 714 res = vm_buf_to_mboj_offs(&utc->uctx, va, s, in tee_svc_copy_param() 784 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_open_ta_session() local 810 res = tee_ta_open_session(&ret_o, &s, &utc->open_sessions, uuid, in syscall_open_ta_session() 812 vm_set_ctx(&utc->ta_ctx.ts_ctx); in syscall_open_ta_session() [all …]
|
| H A D | tee_svc_cryp.c | 1728 static TEE_Result copy_in_attrs(struct user_ta_ctx *utc, in copy_in_attrs() argument 1761 res = vm_check_access_rights(&utc->uctx, flags, buf, in copy_in_attrs() 2583 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in tee_svc_cryp_get_state() local 2585 TAILQ_FOREACH(s, &utc->cryp_states, link) { in tee_svc_cryp_get_state() 2594 static void cryp_state_free(struct user_ta_ctx *utc, struct tee_cryp_state *cs) in cryp_state_free() argument 2598 if (tee_obj_get(utc, cs->key1, &o) == TEE_SUCCESS) in cryp_state_free() 2599 tee_obj_close(utc, o); in cryp_state_free() 2600 if (tee_obj_get(utc, cs->key2, &o) == TEE_SUCCESS) in cryp_state_free() 2601 tee_obj_close(utc, o); in cryp_state_free() 2603 TAILQ_REMOVE(&utc->cryp_states, cs, link); in cryp_state_free() [all …]
|
| /optee_os/core/arch/arm/tee/ |
| H A D | svc_cache.c | 15 struct user_ta_ctx *utc = NULL; in syscall_cache_operation() local 21 utc = to_user_ta_ctx(s->ctx); in syscall_cache_operation() 27 if (vm_buf_intersects_um_private(&utc->uctx, va, len)) in syscall_cache_operation() 30 res = vm_check_access_rights(&utc->uctx, in syscall_cache_operation()
|
| /optee_os/core/include/tee/ |
| H A D | tee_obj.h | 27 void tee_obj_add(struct user_ta_ctx *utc, struct tee_obj *o); 29 TEE_Result tee_obj_get(struct user_ta_ctx *utc, vaddr_t obj_id, 32 void tee_obj_close(struct user_ta_ctx *utc, struct tee_obj *o); 34 void tee_obj_close_all(struct user_ta_ctx *utc);
|
| H A D | tee_svc_storage.h | 62 void tee_svc_storage_close_all_enum(struct user_ta_ctx *utc);
|
| H A D | tee_svc_cryp.h | 38 void tee_svc_cryp_free_states(struct user_ta_ctx *utc);
|
| /optee_os/core/arch/arm/kernel/ |
| H A D | arch_scall.c | 49 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in scall_save_panic_stack() local 55 if (vm_check_access_rights(&utc->uctx, in scall_save_panic_stack() 121 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in scall_save_panic_stack() local 123 if (vm_check_access_rights(&utc->uctx, in scall_save_panic_stack() 127 utc->uctx.is_32bit ? in scall_save_panic_stack() 140 if (utc->uctx.is_32bit) in scall_save_panic_stack()
|
| H A D | secure_partition.c | 1890 struct sp_ctx *utc = to_sp_ctx(ctx); in sp_dump_state() local 1892 if (utc->uctx.dump_entry_func) { in sp_dump_state() 1893 TEE_Result res = ldelf_dump_state(&utc->uctx); in sp_dump_state() 1899 user_mode_ctx_print_mappings(&utc->uctx); in sp_dump_state()
|
| H A D | thread.c | 988 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in thread_get_pauth_keys() local 990 return &utc->uctx.keys; in thread_get_pauth_keys()
|
| /optee_os/core/arch/riscv/kernel/ |
| H A D | arch_scall.c | 57 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in scall_save_panic_stack() local 59 if (vm_check_access_rights(&utc->uctx, in scall_save_panic_stack()
|