Lines Matching full:shm
291 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
300 shm = tee_shm_alloc_user_buf(ctx, data.size); in tee_ioctl_shm_alloc()
301 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
302 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
304 data.id = shm->id; in tee_ioctl_shm_alloc()
305 data.size = shm->size; in tee_ioctl_shm_alloc()
310 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
317 tee_shm_put(shm); in tee_ioctl_shm_alloc()
327 struct tee_shm *shm; in tee_ioctl_shm_register() local
336 shm = tee_shm_register_user_buf(ctx, data.addr, data.length); in tee_ioctl_shm_register()
337 if (IS_ERR(shm)) in tee_ioctl_shm_register()
338 return PTR_ERR(shm); in tee_ioctl_shm_register()
340 data.id = shm->id; in tee_ioctl_shm_register()
341 data.length = shm->size; in tee_ioctl_shm_register()
346 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_register()
352 tee_shm_put(shm); in tee_ioctl_shm_register()
363 struct tee_shm *shm; in params_from_user() local
402 shm = tee_shm_get_from_id(ctx, ip.c); in params_from_user()
403 if (IS_ERR(shm)) in params_from_user()
404 return PTR_ERR(shm); in params_from_user()
412 (ip.a + ip.b) > shm->size) { in params_from_user()
413 tee_shm_put(shm); in params_from_user()
418 shm = NULL; in params_from_user()
425 params[n].u.memref.shm = shm; in params_from_user()
535 params[n].u.memref.shm) in tee_ioctl_open_session()
536 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_open_session()
597 params[n].u.memref.shm) in tee_ioctl_invoke()
598 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_invoke()
656 if (!p->u.memref.shm) { in params_to_supp()
658 ip.c = (u64)-1; /* invalid shm id */ in params_to_supp()
662 ip.c = p->u.memref.shm->id; in params_to_supp()
763 p->u.memref.shm = NULL; in params_from_supp()