Lines Matching refs:sess

518 	TEE_Result (*to_user)(void *attr, struct ts_session *sess,
575 struct ts_session *sess __unused, in op_attr_secret_value_to_user()
670 struct ts_session *sess, in op_attr_bignum_to_user() argument
692 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in op_attr_bignum_to_user()
784 struct ts_session *sess __unused, in op_attr_value_to_user()
889 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_get_info() local
893 res = tee_obj_get(to_user_ta_ctx(sess->ctx), in syscall_cryp_obj_get_info()
907 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_restrict_usage() local
911 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_cryp_obj_restrict_usage()
974 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_get_attr() local
982 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_cryp_obj_get_attr()
1007 return ops->to_user(attr, sess, buffer, size); in syscall_cryp_obj_get_attr()
1312 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_alloc() local
1327 tee_obj_add(to_user_ta_ctx(sess->ctx), o); in syscall_cryp_obj_alloc()
1331 tee_obj_close(to_user_ta_ctx(sess->ctx), o); in syscall_cryp_obj_alloc()
1337 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_close() local
1341 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_cryp_obj_close()
1352 tee_obj_close(to_user_ta_ctx(sess->ctx), o); in syscall_cryp_obj_close()
1358 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_reset() local
1362 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_cryp_obj_reset()
1646 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_populate() local
1653 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_cryp_obj_populate()
1676 res = copy_in_attrs(to_user_ta_ctx(sess->ctx), usr_attrs, attr_count, in syscall_cryp_obj_populate()
1697 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_obj_copy() local
1702 res = tee_obj_get(to_user_ta_ctx(sess->ctx), in syscall_cryp_obj_copy()
1707 res = tee_obj_get(to_user_ta_ctx(sess->ctx), in syscall_cryp_obj_copy()
1879 struct ts_session *sess = ts_get_current_session(); in syscall_obj_generate_key() local
1888 res = tee_obj_get(to_user_ta_ctx(sess->ctx), uref_to_vaddr(obj), &o); in syscall_obj_generate_key()
1916 res = copy_in_attrs(to_user_ta_ctx(sess->ctx), usr_params, param_count, in syscall_obj_generate_key()
2008 static TEE_Result tee_svc_cryp_get_state(struct ts_session *sess, in tee_svc_cryp_get_state() argument
2013 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in tee_svc_cryp_get_state()
2166 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_state_alloc() local
2167 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_cryp_state_alloc()
2288 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_state_copy() local
2293 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(dst), &cs_dst); in syscall_cryp_state_copy()
2297 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(src), &cs_src); in syscall_cryp_state_copy()
2336 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_state_free() local
2340 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_cryp_state_free()
2343 cryp_state_free(to_user_ta_ctx(sess->ctx), cs); in syscall_cryp_state_free()
2351 struct ts_session *sess = ts_get_current_session(); in syscall_hash_init() local
2355 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_hash_init()
2370 res = tee_obj_get(to_user_ta_ctx(sess->ctx), in syscall_hash_init()
2397 struct ts_session *sess = ts_get_current_session(); in syscall_hash_update() local
2409 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_hash_update()
2416 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_hash_update()
2444 struct ts_session *sess = ts_get_current_session(); in syscall_hash_final() local
2455 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_hash_final()
2466 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_hash_final()
2474 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_hash_final()
2535 struct ts_session *sess = ts_get_current_session(); in syscall_cipher_init() local
2536 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_cipher_init()
2542 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_cipher_init()
2592 struct ts_session *sess = ts_get_current_session(); in tee_svc_cipher_update_helper() local
2597 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in tee_svc_cipher_update_helper()
2604 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in tee_svc_cipher_update_helper()
2614 struct user_mode_ctx *uctx = &to_user_ta_ctx(sess->ctx)->uctx; in tee_svc_cipher_update_helper()
2922 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_derive_key() local
2923 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_cryp_derive_key()
2933 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_cryp_derive_key()
3199 struct ts_session *sess = ts_get_current_session(); in syscall_cryp_random_number_generate() local
3202 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_cryp_random_number_generate()
3219 struct ts_session *sess = ts_get_current_session(); in syscall_authenc_init() local
3225 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_authenc_init()
3232 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_authenc_init()
3236 res = tee_obj_get(to_user_ta_ctx(sess->ctx), cs->key1, &o); in syscall_authenc_init()
3258 struct ts_session *sess = ts_get_current_session(); in syscall_authenc_update_aad() local
3262 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_authenc_update_aad()
3269 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_authenc_update_aad()
3292 struct ts_session *sess = ts_get_current_session(); in syscall_authenc_update_payload() local
3297 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_authenc_update_payload()
3307 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_authenc_update_payload()
3318 res = vm_check_access_rights(&to_user_ta_ctx(sess->ctx)->uctx, in syscall_authenc_update_payload()
3349 struct ts_session *sess = ts_get_current_session(); in syscall_authenc_enc_final() local
3350 struct user_mode_ctx *uctx = &to_user_ta_ctx(sess->ctx)->uctx; in syscall_authenc_enc_final()
3356 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_authenc_enc_final()
3434 struct ts_session *sess = ts_get_current_session(); in syscall_authenc_dec_final() local
3435 struct user_mode_ctx *uctx = &to_user_ta_ctx(sess->ctx)->uctx; in syscall_authenc_dec_final()
3440 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_authenc_dec_final()
3527 struct ts_session *sess = ts_get_current_session(); in syscall_asymm_operate() local
3528 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_asymm_operate()
3540 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_asymm_operate()
3704 struct ts_session *sess = ts_get_current_session(); in syscall_asymm_verify() local
3705 struct user_ta_ctx *utc = to_user_ta_ctx(sess->ctx); in syscall_asymm_verify()
3715 res = tee_svc_cryp_get_state(sess, uref_to_vaddr(state), &cs); in syscall_asymm_verify()