Send actual keylen to TZ

Send the actual keylen instead of the shm
bridge allocation length.

Change-Id: I662078b10bf47cb1747fdec8c147faaa64b3e95d
Signed-off-by: Barani Muthukumaran <bmuthuku@codeaurora.org>
This commit is contained in:
Barani Muthukumaran 2020-04-26 01:31:46 -07:00 • committed by Gerrit - the friendly Code Review server
commit 4fae88ce06

View file

@ -31,8 +31,9 @@ int crypto_qti_program_key(struct crypto_vops_qti_entry *ice_entry,
memcpy(shm.vaddr, key->raw, key->size);
qtee_shmbridge_flush_shm_buf(&shm);
err = qcom_scm_config_set_ice_key(slot, shm.paddr, shm.size,
ICE_CIPHER_MODE_XTS_256, data_unit_mask, UFS_CE);
err = qcom_scm_config_set_ice_key(slot, shm.paddr, key->size,
ICE_CIPHER_MODE_XTS_256,
data_unit_mask, UFS_CE);
if (err)
pr_err("%s:SCM call Error: 0x%x slot %d\n",
__func__, err, slot);