diff options
author | Jens Wiklander | 2017-02-16 09:07:02 +0100 |
---|---|---|
committer | Jens Wiklander | 2017-08-04 10:30:27 +0200 |
commit | 059cf566e123ca7eb7434285c6455d7afafb4e02 (patch) | |
tree | 683441447cb3b9de901379212501cc0322ead9bf /drivers/tee | |
parent | a9980e947ec97297e03d2332d6beff06f5131a98 (diff) |
tee: indicate privileged dev in gen_caps
Mirrors the TEE_DESC_PRIVILEGED bit of struct tee_desc:flags into struct
tee_ioctl_version_data:gen_caps as TEE_GEN_CAP_PRIVILEGED in
tee_ioctl_version()
Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r-- | drivers/tee/tee_core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tee/tee_core.c b/drivers/tee/tee_core.c index 5c60bf4423e6..58a5009eacc3 100644 --- a/drivers/tee/tee_core.c +++ b/drivers/tee/tee_core.c @@ -90,8 +90,13 @@ static int tee_ioctl_version(struct tee_context *ctx, struct tee_ioctl_version_data vers; ctx->teedev->desc->ops->get_version(ctx->teedev, &vers); + + if (ctx->teedev->desc->flags & TEE_DESC_PRIVILEGED) + vers.gen_caps |= TEE_GEN_CAP_PRIVILEGED; + if (copy_to_user(uvers, &vers, sizeof(vers))) return -EFAULT; + return 0; } |