tee: add cancellation support to client interface

Add support of cancellation request to the TEE kernel internal
client interface. Can be used by software TPM drivers, that leverage
TEE under the hood (for instance TPM2.0 mobile profile), for requesting
cancellation of time-consuming operations (RSA key-pair generation etc.).

Signed-off-by: Igor Opaniuk <igor.opaniuk@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Cette révision appartient à :
Igor Opaniuk
2019-01-24 19:32:31 +02:00
révisé par Jens Wiklander
Parent 5fe8b1cc6a
révision 4f062dc1b7
2 fichiers modifiés avec 21 ajouts et 0 suppressions

Voir le fichier

@@ -1039,6 +1039,15 @@ int tee_client_invoke_func(struct tee_context *ctx,
}
EXPORT_SYMBOL_GPL(tee_client_invoke_func);
int tee_client_cancel_req(struct tee_context *ctx,
struct tee_ioctl_cancel_arg *arg)
{
if (!ctx->teedev->desc->ops->cancel_req)
return -EINVAL;
return ctx->teedev->desc->ops->cancel_req(ctx, arg->cancel_id,
arg->session);
}
static int tee_client_device_match(struct device *dev,
struct device_driver *drv)
{