Lines Matching refs:num_params
356 size_t num_params, in params_from_user() argument
361 for (n = 0; n < num_params; n++) { in params_from_user()
435 size_t num_params, struct tee_param *params) in params_to_user() argument
439 for (n = 0; n < num_params; n++) { in params_to_user()
489 if (sizeof(arg) + TEE_IOCTL_PARAM_SIZE(arg.num_params) != buf.buf_len) in tee_ioctl_open_session()
492 if (arg.num_params) { in tee_ioctl_open_session()
493 params = kcalloc(arg.num_params, sizeof(struct tee_param), in tee_ioctl_open_session()
498 rc = params_from_user(ctx, params, arg.num_params, uparams); in tee_ioctl_open_session()
521 rc = params_to_user(uparams, arg.num_params, params); in tee_ioctl_open_session()
532 for (n = 0; n < arg.num_params; n++) in tee_ioctl_open_session()
567 if (sizeof(arg) + TEE_IOCTL_PARAM_SIZE(arg.num_params) != buf.buf_len) in tee_ioctl_invoke()
570 if (arg.num_params) { in tee_ioctl_invoke()
571 params = kcalloc(arg.num_params, sizeof(struct tee_param), in tee_ioctl_invoke()
576 rc = params_from_user(ctx, params, arg.num_params, uparams); in tee_ioctl_invoke()
590 rc = params_to_user(uparams, arg.num_params, params); in tee_ioctl_invoke()
594 for (n = 0; n < arg.num_params; n++) in tee_ioctl_invoke()
635 size_t num_params, struct tee_param *params) in params_to_supp() argument
639 for (n = 0; n < num_params; n++) { in params_to_supp()
684 u32 num_params; in tee_ioctl_supp_recv() local
698 if (get_user(num_params, &uarg->num_params)) in tee_ioctl_supp_recv()
701 if (sizeof(*uarg) + TEE_IOCTL_PARAM_SIZE(num_params) != buf.buf_len) in tee_ioctl_supp_recv()
704 params = kcalloc(num_params, sizeof(struct tee_param), GFP_KERNEL); in tee_ioctl_supp_recv()
708 rc = params_from_user(ctx, params, num_params, uarg->params); in tee_ioctl_supp_recv()
712 rc = ctx->teedev->desc->ops->supp_recv(ctx, &func, &num_params, params); in tee_ioctl_supp_recv()
717 put_user(num_params, &uarg->num_params)) { in tee_ioctl_supp_recv()
722 rc = params_to_supp(ctx, uarg->params, num_params, params); in tee_ioctl_supp_recv()
728 static int params_from_supp(struct tee_param *params, size_t num_params, in params_from_supp() argument
733 for (n = 0; n < num_params; n++) { in params_from_supp()
781 u32 num_params; in tee_ioctl_supp_send() local
797 get_user(num_params, &uarg->num_params)) in tee_ioctl_supp_send()
800 if (sizeof(*uarg) + TEE_IOCTL_PARAM_SIZE(num_params) > buf.buf_len) in tee_ioctl_supp_send()
803 params = kcalloc(num_params, sizeof(struct tee_param), GFP_KERNEL); in tee_ioctl_supp_send()
807 rc = params_from_supp(params, num_params, uarg->params); in tee_ioctl_supp_send()
811 rc = ctx->teedev->desc->ops->supp_send(ctx, ret, num_params, params); in tee_ioctl_supp_send()