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
9090 struct tee_ioctl_version_data vers;
9191
9292 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+
9397 if (copy_to_user(uvers, &vers, sizeof(vers)))
9498 return -EFAULT;
99+
95100 return 0;
96101 }
97102
include/uapi/linux/tee.h+1−0
@@ -49,6 +49,7 @@ · 48 unmodified lines
4949 #define TEE_MAX_ARG_SIZE 1024
5050
5151 #define TEE_GEN_CAP_GP (1 << 0)/* GlobalPlatform compliant TEE */
52+#define TEE_GEN_CAP_PRIVILEGED (1 << 1)/* Privileged device (for supplicant) */
5253
5354 /*
5455 * 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