Message ID | 1616721648-56258-2-git-send-email-yekai13@huawei.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Herbert Xu |
Headers | show |
Series | crypto: replace memset by memzero_explicit | expand |
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 352d80c..4a08b2a 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -1622,7 +1622,7 @@ static inline void atmel_sha_hmac_key_init(struct atmel_sha_hmac_key *hkey) static inline void atmel_sha_hmac_key_release(struct atmel_sha_hmac_key *hkey) { kfree(hkey->keydup); - memset(hkey, 0, sizeof(*hkey)); + memzero_explicit(hkey, sizeof(*hkey)); } static inline int atmel_sha_hmac_key_set(struct atmel_sha_hmac_key *hkey,
use memzero_explicit instead of memset to clear sensitive data, such as key. Signed-off-by: Kai Ye <yekai13@huawei.com> --- drivers/crypto/atmel-sha.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)