History

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()

Jens Wiklander committed 9 years ago

Commit 059cf561 parent a9980e92 files · +6 −0Browse files

Unified · Split

2 files
  1. drivers/tee/tee_core.c +5 −0
  2. include/uapi/linux/tee.h +1 −0
drivers/tee/tee_core.c+5−0
@@ -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
include/uapi/linux/tee.h+1−0
@@ -49,6 +49,7 @@ · 48 unmodified lines
49#define TEE_MAX_ARG_SIZE 102449#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 ID55 * TEE Implementation ID

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t