diff options
author | Sumit Garg <sumit.garg@linaro.org> | 2022-11-10 14:11:40 +0300 |
---|---|---|
committer | Jarkko Sakkinen <jarkko@kernel.org> | 2022-12-08 19:20:46 +0300 |
commit | 1506fba28b53fd159c7028c4809a4a3143a38eb7 (patch) | |
tree | b3846368332ee092f49d8c581910699aaccb5b20 /security/keys/trusted-keys/trusted_tee.c | |
parent | e10de46bc3c60d938ced069e85f3e7d009a656d2 (diff) | |
download | linux-1506fba28b53fd159c7028c4809a4a3143a38eb7.tar.xz |
KEYS: trusted: tee: Make registered shm dependency explicit
TEE trusted keys support depends on registered shared memory support
since the key buffers are needed to be registered with OP-TEE. So make
that dependency explicit to not register trusted keys support if
underlying implementation doesn't support registered shared memory.
Signed-off-by: Sumit Garg <sumit.garg@linaro.org>
Tested-by: Jerome Forissier <jerome.forissier@linaro.org>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'security/keys/trusted-keys/trusted_tee.c')
-rw-r--r-- | security/keys/trusted-keys/trusted_tee.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/security/keys/trusted-keys/trusted_tee.c b/security/keys/trusted-keys/trusted_tee.c index c8626686ee1b..ac3e270ade69 100644 --- a/security/keys/trusted-keys/trusted_tee.c +++ b/security/keys/trusted-keys/trusted_tee.c @@ -219,7 +219,8 @@ static int trusted_tee_get_random(unsigned char *key, size_t key_len) static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data) { - if (ver->impl_id == TEE_IMPL_ID_OPTEE) + if (ver->impl_id == TEE_IMPL_ID_OPTEE && + ver->gen_caps & TEE_GEN_CAP_REG_MEM) return 1; else return 0; |