Lines Matching refs:shm
287 struct tee_shm *shm; in tee_ioctl_shm_alloc() local
296 shm = tee_shm_alloc(ctx, data.size, TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); in tee_ioctl_shm_alloc()
297 if (IS_ERR(shm)) in tee_ioctl_shm_alloc()
298 return PTR_ERR(shm); in tee_ioctl_shm_alloc()
300 data.id = shm->id; in tee_ioctl_shm_alloc()
301 data.flags = shm->flags; in tee_ioctl_shm_alloc()
302 data.size = shm->size; in tee_ioctl_shm_alloc()
307 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_alloc()
314 tee_shm_put(shm); in tee_ioctl_shm_alloc()
324 struct tee_shm *shm; in tee_ioctl_shm_register() local
333 shm = tee_shm_register(ctx, data.addr, data.length, in tee_ioctl_shm_register()
335 if (IS_ERR(shm)) in tee_ioctl_shm_register()
336 return PTR_ERR(shm); in tee_ioctl_shm_register()
338 data.id = shm->id; in tee_ioctl_shm_register()
339 data.flags = shm->flags; in tee_ioctl_shm_register()
340 data.length = shm->size; in tee_ioctl_shm_register()
345 ret = tee_shm_get_fd(shm); in tee_ioctl_shm_register()
351 tee_shm_put(shm); in tee_ioctl_shm_register()
362 struct tee_shm *shm; in params_from_user() local
401 shm = tee_shm_get_from_id(ctx, ip.c); in params_from_user()
402 if (IS_ERR(shm)) in params_from_user()
403 return PTR_ERR(shm); in params_from_user()
411 (ip.a + ip.b) > shm->size) { in params_from_user()
412 tee_shm_put(shm); in params_from_user()
417 shm = NULL; in params_from_user()
424 params[n].u.memref.shm = shm; in params_from_user()
533 params[n].u.memref.shm) in tee_ioctl_open_session()
534 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_open_session()
595 params[n].u.memref.shm) in tee_ioctl_invoke()
596 tee_shm_put(params[n].u.memref.shm); in tee_ioctl_invoke()
654 if (!p->u.memref.shm) { in params_to_supp()
660 ip.c = p->u.memref.shm->id; in params_to_supp()
761 p->u.memref.shm = NULL; in params_from_supp()