Searched hist:f5348ecbad9c92c1e5405cd95390ff97c9f43786 (Results 1 – 1 of 1) sorted by relevance
| /optee_os/core/tee/ |
| H A D | tee_svc_cryp.c | f5348ecbad9c92c1e5405cd95390ff97c9f43786 Fri Aug 25 10:11:21 UTC 2023 Jens Wiklander <jens.wiklander@linaro.org> core: tee_svc_cryp.c: replace get_used_bits()
Prior to this patch was get_used_bits() called in tee_svc_cryp_obj_populate_type() to check that a bignum isn't too large. While the code works it's more complicated than necessary. The bignum has just been imported so the normal bignum functions can be used directly instead of copying the user space buffer again and feed it to bit_ffs(). So replace the call to get_used_bits() with a call to crypto_bignum_num_bits() on the newly imported bignum.
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> Reviewed-by: Jerome Forissier <jerome.forissier@linaro.org> Reviewed-by: Etienne Carriere <etienne.carriere@foss.st.com>
|