Lines Matching refs:uvio_attest

35 				  u8 *meas, u8 *add_data, struct uvio_attest *uvio_attest)  in uvio_build_uvcb_attest()  argument
37 void __user *user_buf_arcb = (void __user *)uvio_attest->arcb_addr; in uvio_build_uvcb_attest()
39 if (copy_from_user(arcb, user_buf_arcb, uvio_attest->arcb_len)) in uvio_build_uvcb_attest()
46 uvcb_attest->user_data_len = uvio_attest->user_data_len; in uvio_build_uvcb_attest()
47 memcpy(uvcb_attest->user_data, uvio_attest->user_data, sizeof(uvcb_attest->user_data)); in uvio_build_uvcb_attest()
48 uvcb_attest->meas_len = uvio_attest->meas_len; in uvio_build_uvcb_attest()
50 uvcb_attest->add_data_len = uvio_attest->add_data_len; in uvio_build_uvcb_attest()
59 struct uvio_attest *uvio_attest) in uvio_copy_attest_result_to_user() argument
61 struct uvio_attest __user *user_uvio_attest = (void __user *)uv_ioctl->argument_addr; in uvio_copy_attest_result_to_user()
62 void __user *user_buf_add = (void __user *)uvio_attest->add_data_addr; in uvio_copy_attest_result_to_user()
63 void __user *user_buf_meas = (void __user *)uvio_attest->meas_addr; in uvio_copy_attest_result_to_user()
66 if (copy_to_user(user_buf_meas, measurement, uvio_attest->meas_len)) in uvio_copy_attest_result_to_user()
68 if (add_data && copy_to_user(user_buf_add, add_data, uvio_attest->add_data_len)) in uvio_copy_attest_result_to_user()
75 static int get_uvio_attest(struct uvio_ioctl_cb *uv_ioctl, struct uvio_attest *uvio_attest) in get_uvio_attest() argument
79 if (copy_from_user(uvio_attest, user_arg_buf, sizeof(*uvio_attest))) in get_uvio_attest()
82 if (uvio_attest->arcb_len > UVIO_ATT_ARCB_MAX_LEN) in get_uvio_attest()
84 if (uvio_attest->arcb_len == 0) in get_uvio_attest()
86 if (uvio_attest->meas_len > UVIO_ATT_MEASUREMENT_MAX_LEN) in get_uvio_attest()
88 if (uvio_attest->meas_len == 0) in get_uvio_attest()
90 if (uvio_attest->add_data_len > UVIO_ATT_ADDITIONAL_MAX_LEN) in get_uvio_attest()
92 if (uvio_attest->reserved136) in get_uvio_attest()
132 struct uvio_attest *uvio_attest = NULL; in uvio_attestation() local
139 if (uv_ioctl->argument_len != sizeof(*uvio_attest)) in uvio_attestation()
143 uvio_attest = kzalloc(sizeof(*uvio_attest), GFP_KERNEL); in uvio_attestation()
144 if (!uvio_attest) in uvio_attestation()
147 ret = get_uvio_attest(uv_ioctl, uvio_attest); in uvio_attestation()
152 arcb = kvzalloc(uvio_attest->arcb_len, GFP_KERNEL); in uvio_attestation()
153 measurement = kvzalloc(uvio_attest->meas_len, GFP_KERNEL); in uvio_attestation()
157 if (uvio_attest->add_data_len) { in uvio_attestation()
158 add_data = kvzalloc(uvio_attest->add_data_len, GFP_KERNEL); in uvio_attestation()
167 ret = uvio_build_uvcb_attest(uvcb_attest, arcb, measurement, add_data, uvio_attest); in uvio_attestation()
177 uvio_attest); in uvio_attestation()
182 kfree(uvio_attest); in uvio_attestation()