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()
Unified · Split
| @@ -90,8 +90,13 @@ static int tee_ioctl_version(struct tee_context *ctx, · 89 unmodified lines | |||
| 90 | struct tee_ioctl_version_data vers; | 90 | struct tee_ioctl_version_data vers; |
| 91 | 91 | ||
| 92 | ctx->teedev->desc->ops->get_version(ctx->teedev, &vers); | 92 | ctx->teedev->desc->ops->get_version(ctx->teedev, &vers); |
| 93 | |||
| 94 | if (ctx->teedev->desc->flags & TEE_DESC_PRIVILEGED) | ||
| 95 | vers.gen_caps |= TEE_GEN_CAP_PRIVILEGED; | ||
| 96 | |||
| 93 | if (copy_to_user(uvers, &vers, sizeof(vers))) | 97 | if (copy_to_user(uvers, &vers, sizeof(vers))) |
| 94 | return -EFAULT; | 98 | return -EFAULT; |
| 99 | |||
| 95 | return 0; | 100 | return 0; |
| 96 | } | 101 | } |
| 97 | 102 | ||
| @@ -49,6 +49,7 @@ · 48 unmodified lines | |||
| 49 | #define TEE_MAX_ARG_SIZE 1024 | 49 | #define TEE_MAX_ARG_SIZE 1024 |
| 50 | 50 | ||
| 51 | #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ | 51 | #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */ |
| 52 | #define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */ | ||
| 52 | 53 | ||
| 53 | /* | 54 | /* |
| 54 | * TEE Implementation ID | 55 | * TEE Implementation ID |