* [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree
@ 2023-07-17 9:45 Wang Ming
2023-07-17 10:47 ` Harald Freudenberger
2023-07-18 7:38 ` Heiko Carstens
0 siblings, 2 replies; 3+ messages in thread
From: Wang Ming @ 2023-07-17 9:45 UTC (permalink / raw)
To: Herbert Xu, David S. Miller, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
linux-crypto, linux-s390, linux-kernel
Cc: opensource.kernel, Wang Ming
key might contain private part of the key, so better use
kfree_sensitive to free it.
Signed-off-by: Wang Ming <machel@vivo.com>
---
arch/s390/crypto/paes_s390.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/s390/crypto/paes_s390.c b/arch/s390/crypto/paes_s390.c
index d29a9d908797..38349150c96e 100644
--- a/arch/s390/crypto/paes_s390.c
+++ b/arch/s390/crypto/paes_s390.c
@@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob *kb)
{
if (kb->key && kb->key != kb->keybuf
&& kb->keylen > sizeof(kb->keybuf)) {
- kfree(kb->key);
+ kfree_sensitive(kb->key);
kb->key = NULL;
}
}
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree
2023-07-17 9:45 [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree Wang Ming
@ 2023-07-17 10:47 ` Harald Freudenberger
2023-07-18 7:38 ` Heiko Carstens
1 sibling, 0 replies; 3+ messages in thread
From: Harald Freudenberger @ 2023-07-17 10:47 UTC (permalink / raw)
To: Wang Ming
Cc: Herbert Xu, David S. Miller, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
linux-crypto, linux-s390, linux-kernel, opensource.kernel
On 2023-07-17 11:45, Wang Ming wrote:
> key might contain private part of the key, so better use
> kfree_sensitive to free it.
>
> Signed-off-by: Wang Ming <machel@vivo.com>
> ---
> arch/s390/crypto/paes_s390.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/s390/crypto/paes_s390.c
> b/arch/s390/crypto/paes_s390.c
> index d29a9d908797..38349150c96e 100644
> --- a/arch/s390/crypto/paes_s390.c
> +++ b/arch/s390/crypto/paes_s390.c
> @@ -103,7 +103,7 @@ static inline void _free_kb_keybuf(struct key_blob
> *kb)
> {
> if (kb->key && kb->key != kb->keybuf
> && kb->keylen > sizeof(kb->keybuf)) {
> - kfree(kb->key);
> + kfree_sensitive(kb->key);
> kb->key = NULL;
> }
> }
Reviewed-by: Harald Freudenberger <freude@linux.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree
2023-07-17 9:45 [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree Wang Ming
2023-07-17 10:47 ` Harald Freudenberger
@ 2023-07-18 7:38 ` Heiko Carstens
1 sibling, 0 replies; 3+ messages in thread
From: Heiko Carstens @ 2023-07-18 7:38 UTC (permalink / raw)
To: Wang Ming
Cc: Herbert Xu, David S. Miller, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, linux-crypto, linux-s390,
linux-kernel, opensource.kernel
On Mon, Jul 17, 2023 at 05:45:19PM +0800, Wang Ming wrote:
> key might contain private part of the key, so better use
> kfree_sensitive to free it.
>
> Signed-off-by: Wang Ming <machel@vivo.com>
> ---
> arch/s390/crypto/paes_s390.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-07-18 7:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-17 9:45 [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree Wang Ming
2023-07-17 10:47 ` Harald Freudenberger
2023-07-18 7:38 ` Heiko Carstens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).