Lines Matching refs:uv_ioctl

71 static int uvio_uvdev_info(struct uvio_ioctl_cb *uv_ioctl)  in uvio_uvdev_info()  argument
73 void __user *user_buf_arg = (void __user *)uv_ioctl->argument_addr; in uvio_uvdev_info()
75 if (uv_ioctl->argument_len < sizeof(uvdev_info)) in uvio_uvdev_info()
80 uv_ioctl->uv_rc = UVC_RC_EXECUTED; in uvio_uvdev_info()
107 struct uvio_ioctl_cb *uv_ioctl, in uvio_copy_attest_result_to_user() argument
111 struct uvio_attest __user *user_uvio_attest = (void __user *)uv_ioctl->argument_addr; in uvio_copy_attest_result_to_user()
125 static int get_uvio_attest(struct uvio_ioctl_cb *uv_ioctl, struct uvio_attest *uvio_attest) in get_uvio_attest() argument
127 u8 __user *user_arg_buf = (u8 __user *)uv_ioctl->argument_addr; in get_uvio_attest()
179 static int uvio_attestation(struct uvio_ioctl_cb *uv_ioctl) in uvio_attestation() argument
189 if (uv_ioctl->argument_len != sizeof(*uvio_attest)) in uvio_attestation()
197 ret = get_uvio_attest(uv_ioctl, uvio_attest); in uvio_attestation()
223 uv_ioctl->uv_rc = uvcb_attest->header.rc; in uvio_attestation()
224 uv_ioctl->uv_rrc = uvcb_attest->header.rrc; in uvio_attestation()
226 ret = uvio_copy_attest_result_to_user(uvcb_attest, uv_ioctl, measurement, add_data, in uvio_attestation()
262 static int uvio_add_secret(struct uvio_ioctl_cb *uv_ioctl) in uvio_add_secret() argument
264 void __user *user_buf_arg = (void __user *)uv_ioctl->argument_addr; in uvio_add_secret()
272 if (uv_ioctl->argument_len > UVIO_ADD_SECRET_MAX_LEN) in uvio_add_secret()
274 if (uv_ioctl->argument_len == 0) in uvio_add_secret()
277 asrcb = kvzalloc(uv_ioctl->argument_len, GFP_KERNEL); in uvio_add_secret()
282 if (copy_from_user(asrcb, user_buf_arg, uv_ioctl->argument_len)) in uvio_add_secret()
288 uv_ioctl->uv_rc = uvcb.header.rc; in uvio_add_secret()
289 uv_ioctl->uv_rrc = uvcb.header.rrc; in uvio_add_secret()
315 static int uvio_list_secrets(struct uvio_ioctl_cb *uv_ioctl) in uvio_list_secrets() argument
317 void __user *user_buf_arg = (void __user *)uv_ioctl->argument_addr; in uvio_list_secrets()
325 if (uv_ioctl->argument_len != UVIO_LIST_SECRETS_LEN) in uvio_list_secrets()
334 uv_ioctl->uv_rc = uvcb.header.rc; in uvio_list_secrets()
335 uv_ioctl->uv_rrc = uvcb.header.rrc; in uvio_list_secrets()
408 struct uvio_ioctl_cb uv_ioctl = { }; in uvio_ioctl() local
412 nr = uvio_copy_and_check_ioctl(&uv_ioctl, argp, cmd); in uvio_ioctl()
418 ret = uvio_uvdev_info(&uv_ioctl); in uvio_ioctl()
421 ret = uvio_attestation(&uv_ioctl); in uvio_ioctl()
424 ret = uvio_add_secret(&uv_ioctl); in uvio_ioctl()
427 ret = uvio_list_secrets(&uv_ioctl); in uvio_ioctl()
430 ret = uvio_lock_secrets(&uv_ioctl); in uvio_ioctl()
439 if (copy_to_user(argp, &uv_ioctl, sizeof(uv_ioctl))) in uvio_ioctl()