[<prev] [next>] [day] [month] [year] [list]
Message-ID: <ZjkK_EfK9L5qMksX@octinomon.home>
Date: Mon, 6 May 2024 17:53:16 +0100
From: Jules Irenge <jbi.octave@...il.com>
To: svens@...ux.ibm.com
Cc: borntraeger@...ux.ibm.com, linux-kernel@...r.kernel.org,
linux-s390@...r.kernel.org, agordeev@...ux.ibm.com,
gor@...ux.ibm.com, freude@...ux.ibm.com
Subject: [PATCH] s390/pkey: use kvfree_sensitive() to fix Coccinelle warning
Replace memzero_expliocit() and kfree() with kfree_sentive() to fix
warning reported by Coccinelle
WARNING opportunity for kfree_sensitive/kvfree_sensitive
Signed-off-by: Jules Irenge <jbi.octave@...il.com>
---
drivers/s390/crypto/pkey_api.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/s390/crypto/pkey_api.c b/drivers/s390/crypto/pkey_api.c
index dccf664a3d95..76e98275f6ab 100644
--- a/drivers/s390/crypto/pkey_api.c
+++ b/drivers/s390/crypto/pkey_api.c
@@ -1503,8 +1503,7 @@ static long pkey_unlocked_ioctl(struct file *filp, unsigned int cmd,
rc = pkey_keyblob2pkey(kkey, ktp.keylen, ktp.protkey.protkey,
&ktp.protkey.len, &ktp.protkey.type);
pr_debug("%s pkey_keyblob2pkey()=%d\n", __func__, rc);
- memzero_explicit(kkey, ktp.keylen);
- kfree(kkey);
+ kvfree_sensitive(kkey, ktp.keylen);
if (rc)
break;
if (copy_to_user(utp, &ktp, sizeof(ktp)))
--
2.43.2
Powered by blists - more mailing lists