crypto: sun8i-ss - remove redundant memzero_explicit()
PATCH 1/1 crypto: sun8i-ss - remove redundant memzero_explicit()
Remove redundant memzero_explicit() in sun8i_ss_cipher() before calling kfree_sensitive(). kfree_sensitive() will zero the memory with memzero_explicit().
--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - 1 file changed, 1 deletion(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +0 -1
@@ -248,7 +248,6 @@ static int sun8i_ss_cipher(struct skcipher_request *areq) offset = areq->cryptlen - ivsize;if (rctx->op_dir &SS_DECRYPTION ) {memcpy (areq->iv, backup_iv, ivsize); -memzero_explicit (backup_iv, ivsize);kfree_sensitive (backup_iv); }else { scatterwalk_map_and_copy(areq->iv, areq->dst, offset,
Signature · 1 line
2.26.2
Corentin Labbe
maintainerQuoted 24 lines · Denis Efremov
Remove redundant
memzero_explicit()insun8i_ss_cipher()before callingkfree_sensitive().kfree_sensitive()will zero the memory withmemzero_explicit().Signed-off-by Denis Efremov <[email protected]>--- drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - 1 file changed, 1 deletion(-)drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +0
-1@@ -248,7 +248,6 @@ static int sun8i_ss_cipher(struct skcipher_request *areq) offset = areq->cryptlen - ivsize;if (rctx->op_dir &SS_DECRYPTION ) {memcpy (areq->iv, backup_iv, ivsize); -memzero_explicit (backup_iv, ivsize);kfree_sensitive (backup_iv); }else { scatterwalk_map_and_copy(areq->iv, areq->dst, offset,Signature · 1 line
2.26.2
Hello
Could you add:
Regards
Quoted 2 lines · Corentin Labbe
Could you add:
Fixes 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()")
I doubt this change deserves fixes tag, since this is just a cleanup. Anyway, I will send v2 with it.
Thanks,
Denis
PATCH v2 1/1 crypto: sun8i-ss - remove redundant memzero_explicit()
In reply to Corentin LabbeRemove redundant memzero_explicit() in sun8i_ss_cipher() before calling kfree_sensitive(). kfree_sensitive() will zero the memory with memzero_explicit().
---
Changes in v2:
- fixes tag added
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - 1 file changed, 1 deletion(-)
drivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c +0 -1
@@ -248,7 +248,6 @@ static int sun8i_ss_cipher(struct skcipher_request *areq) offset = areq->cryptlen - ivsize;if (rctx->op_dir &SS_DECRYPTION ) {memcpy (areq->iv, backup_iv, ivsize); -memzero_explicit (backup_iv, ivsize);kfree_sensitive (backup_iv); }else { scatterwalk_map_and_copy(areq->iv, areq->dst, offset,
Signature · 1 line
2.26.2
Herbert Xu
maintainerQuoted 4 lines · Denis Efremov
Remove redundant
memzero_explicit()insun8i_ss_cipher()before callingkfree_sensitive().kfree_sensitive()will zero the memory withmemzero_explicit().
Quoted 8 lines
Fixes 453431a54934 ("mm, treewide: rename kzfree() to kfree_sensitive()")Signed-off-by Denis Efremov <[email protected]>---
Changes in v2:
- fixes tag addeddrivers/crypto/allwinner/sun8i-ss/sun8i-ss-cipher.c | 1 - 1 file changed, 1 deletion(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt