Commit Graph

2 Commits

Author SHA1 Message Date
Iuliana Prodan
7fd7ba6dde LF-1116-1 security/keys/secure_key: update the check for the return code of caam_jr_enqueue function
In commit 4d370a1036 ("crypto: caam - change return code in caam_jr_enqueue function"),
the return code of caam_jr_enqueue function was changed
from 0 to -EINPROGRESS, in case of success, -ENOSPC in case
the CAAM is busy (has no space left in job ring queue),
-EIO if it cannot map the caller's descriptor.

Update the case for wait_for_completion in sk_job_submit
based on the new return code from caam_jr_enqueue function.

Fixes: 4d370a1036 ("crypto: caam - change return code in caam_jr_enqueue function")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Acked-by: Udit Agarwal <udit.agarwal@nxp.com>
2023-10-30 15:52:39 +08:00
Udit Agarwal
6ba5bd5e53 security/keys/secure_key: Adds the secure key support based on CAAM.
Secure keys are derieved using CAAM crypto block.

Secure keys derieved are the random number symmetric keys from CAAM.
Blobs corresponding to the key are formed using CAAM. User space
will only be able to view the blob of the key.

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>

Reviewed-by: Sahil Malhotra <sahil.malhotra@nxp.com>
[ Aisheng: fix minior conflicts due to 
47f9c27968 ("KEYS: trusted: Create trusted keys subsystem") ]
Sign-off-by: Dong Aisheng <aisheng.dong@nxp.com>
2023-10-30 15:52:39 +08:00