/optee_os/core/kernel/ |
A D | user_ta.c | 168 utc->uctx.entry_func, utc->uctx.is_32bit, in user_ta_enter() 174 if (utc->ta_ctx.panicked) { in user_ta_enter() 195 vm_clean_param(&utc->uctx); in user_ta_enter() 352 vm_info_final(&utc->uctx); in free_utc() 357 tee_obj_close_all(utc); in free_utc() 360 free(utc); in free_utc() 421 if (!utc) in tee_ta_init_user_ta_session() 427 TAILQ_INIT(&utc->objects); in tee_ta_init_user_ta_session() 430 utc->ta_ctx.ref_count = 1; in tee_ta_init_user_ta_session() 432 utc->uctx.ts_ctx = &utc->ta_ctx.ts_ctx; in tee_ta_init_user_ta_session() [all …]
|
A D | tee_ta_manager.c | 320 struct user_ta_ctx *utc = NULL; in destroy_ta_ctx_from_session() local 354 utc = to_user_ta_ctx(&ctx->ts_ctx); in destroy_ta_ctx_from_session() 356 TAILQ_FOREACH(sess, &utc->open_sessions, link) { in destroy_ta_ctx_from_session() 872 struct user_ta_ctx *utc = NULL; in tee_ta_gprof_sample_pc() local 883 utc = to_user_ta_ctx(s->ctx); in tee_ta_gprof_sample_pc() 884 res = vm_check_access_rights(&utc->uctx, in tee_ta_gprof_sample_pc()
|
/optee_os/core/tee/ |
A D | tee_obj.c | 16 void tee_obj_add(struct user_ta_ctx *utc, struct tee_obj *o) in tee_obj_add() argument 18 TAILQ_INSERT_TAIL(&utc->objects, o, link); in tee_obj_add() 21 TEE_Result tee_obj_get(struct user_ta_ctx *utc, vaddr_t obj_id, in tee_obj_get() argument 26 TAILQ_FOREACH(o, &utc->objects, link) { in tee_obj_get() 35 void tee_obj_close(struct user_ta_ctx *utc, struct tee_obj *o) in tee_obj_close() argument 37 TAILQ_REMOVE(&utc->objects, o, link); in tee_obj_close() 47 void tee_obj_close_all(struct user_ta_ctx *utc) in tee_obj_close_all() argument 49 struct tee_obj_head *objects = &utc->objects; in tee_obj_close_all() 52 tee_obj_close(utc, TAILQ_FIRST(objects)); in tee_obj_close_all()
|
A D | tee_svc_storage.c | 48 TAILQ_FOREACH(e, &utc->storage_enums, link) { in tee_svc_storage_get_enum() 60 if (e == NULL || utc == NULL) in tee_svc_close_enum() 63 TAILQ_REMOVE(&utc->storage_enums, e, link); in tee_svc_close_enum() 216 tee_obj_add(utc, o); in syscall_storage_obj_open() 234 tee_obj_close(utc, o); in syscall_storage_obj_open() 391 tee_obj_add(utc, o); in syscall_storage_obj_create() 401 tee_obj_close(utc, o); in syscall_storage_obj_create() 452 tee_obj_close(utc, o); in syscall_storage_obj_del() 547 res = tee_svc_storage_get_enum(utc, in syscall_storage_free_enum() 552 return tee_svc_close_enum(utc, e); in syscall_storage_free_enum() [all …]
|
A D | tee_svc.c | 549 if (vm_check_access_rights(&utc->uctx, flags, a, b)) in utee_param_to_param() 609 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in tee_svc_copy_param() local 627 res = vm_check_access_rights(&utc->uctx, flags, in tee_svc_copy_param() 632 res = utee_param_to_param(utc, param, callee_params); in tee_svc_copy_param() 668 res = vm_buf_to_mboj_offs(&utc->uctx, va, s, in tee_svc_copy_param() 800 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_open_ta_session() local 832 vm_set_ctx(&utc->ta_ctx.ts_ctx); in syscall_open_ta_session() 855 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_close_ta_session() local 859 s = tee_ta_find_session(ta_sess, &utc->open_sessions); in syscall_close_ta_session() 872 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_invoke_ta_command() local [all …]
|
A D | tee_svc_cryp.c | 1391 res = vm_check_access_rights(&utc->uctx, in copy_in_attrs() 2029 tee_obj_close(utc, o); in cryp_state_free() 2031 tee_obj_close(utc, o); in cryp_state_free() 2282 cryp_state_free(utc, cs); in syscall_cryp_state_alloc() 2549 res = vm_check_access_rights(&utc->uctx, in syscall_cipher_init() 2556 res = tee_obj_get(utc, cs->key1, &o); in syscall_cipher_init() 2948 res = tee_obj_get(utc, cs->key1, &ko); in syscall_cryp_derive_key() 3163 res = tee_obj_get(utc, cs->key2, &ko2); in syscall_cryp_derive_key() 3544 res = vm_check_access_rights(&utc->uctx, in syscall_asymm_operate() 3573 res = tee_obj_get(utc, cs->key1, &o); in syscall_asymm_operate() [all …]
|
/optee_os/core/arch/arm/tee/ |
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()
|
A D | arch_svc.c | 359 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in save_panic_stack() local 365 if (vm_check_access_rights(&utc->uctx, in save_panic_stack() 428 struct user_ta_ctx *utc = to_user_ta_ctx(s->ctx); in save_panic_stack() local 430 if (vm_check_access_rights(&utc->uctx, in save_panic_stack() 434 utc->uctx.is_32bit ? in save_panic_stack() 447 if (utc->uctx.is_32bit) in save_panic_stack()
|
/optee_os/core/include/tee/ |
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);
|
A D | tee_svc_storage.h | 59 void tee_svc_storage_close_all_enum(struct user_ta_ctx *utc);
|
A D | tee_svc_cryp.h | 37 void tee_svc_cryp_free_states(struct user_ta_ctx *utc);
|
/optee_os/core/mm/ |
A D | mobj.c | 455 struct user_ta_ctx *utc; member 473 if (&m->utc->ta_ctx.ts_ctx != thread_get_tsd()->ctx) in mobj_seccpy_shm_get_va() 493 tee_pager_rem_um_region(&m->utc->uctx, m->va, mobj->size); in mobj_seccpy_shm_free() 494 vm_rem_rwmem(&m->utc->uctx, mobj, m->va); in mobj_seccpy_shm_free() 525 struct user_ta_ctx *utc; in mobj_seccpy_shm_alloc() local 530 utc = to_user_ta_ctx(tsd->ctx); in mobj_seccpy_shm_alloc() 540 if (vm_add_rwmem(&utc->uctx, &m->mobj, &va) != TEE_SUCCESS) in mobj_seccpy_shm_alloc() 545 if (tee_pager_add_um_region(&utc->uctx, va, m->fobj, in mobj_seccpy_shm_alloc() 550 m->utc = to_user_ta_ctx(tsd->ctx); in mobj_seccpy_shm_alloc() 554 vm_rem_rwmem(&utc->uctx, &m->mobj, va); in mobj_seccpy_shm_alloc()
|