Lines Matching refs:shm

292 	struct tee_shm *shm;  in tee_ioctl_shm_alloc()  local
301 shm = tee_shm_alloc_user_buf(ctx, data.size); in tee_ioctl_shm_alloc()
302 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
303 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
305 data.id = shm->id; in tee_ioctl_shm_alloc()
306 data.size = shm->size; in tee_ioctl_shm_alloc()
311 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
318 tee_shm_put(shm); in tee_ioctl_shm_alloc()
328 struct tee_shm *shm; in tee_ioctl_shm_register() local
337 shm = tee_shm_register_user_buf(ctx, data.addr, data.length); in tee_ioctl_shm_register()
338 if (IS_ERR(shm)) in tee_ioctl_shm_register()
339 return PTR_ERR(shm); in tee_ioctl_shm_register()
341 data.id = shm->id; in tee_ioctl_shm_register()
342 data.length = shm->size; in tee_ioctl_shm_register()
347 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_register()
353 tee_shm_put(shm); in tee_ioctl_shm_register()
364 struct tee_shm *shm; in params_from_user() local
403 shm = tee_shm_get_from_id(ctx, ip.c); in params_from_user()
404 if (IS_ERR(shm)) in params_from_user()
405 return PTR_ERR(shm); in params_from_user()
413 (ip.a + ip.b) > shm->size) { in params_from_user()
414 tee_shm_put(shm); in params_from_user()
419 shm = NULL; in params_from_user()
426 params[n].u.memref.shm = shm; in params_from_user()
536 params[n].u.memref.shm) in tee_ioctl_open_session()
537 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_open_session()
598 params[n].u.memref.shm) in tee_ioctl_invoke()
599 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_invoke()
657 if (!p->u.memref.shm) { in params_to_supp()
663 ip.c = p->u.memref.shm->id; in params_to_supp()
764 p->u.memref.shm = NULL; in params_from_supp()