From: Harald Freudenberger <freude@linux.ibm.com>
To: Wang Ming <machel@vivo.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Heiko Carstens <hca@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
linux-crypto@vger.kernel.org, linux-s390@vger.kernel.org,
linux-kernel@vger.kernel.org, opensource.kernel@vivo.com
Subject: Re: [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree
Date: Mon, 17 Jul 2023 12:47:00 +0200 [thread overview]
Message-ID: <4206a7e79f32538e2505722ef4b57386@linux.ibm.com> (raw)
In-Reply-To: <20230717094533.18418-1-machel@vivo.com>
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>
next prev parent reply other threads:[~2023-07-17 10:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-17 9:45 [PATCH v1] arch: s390: Use kfree_sensitive instead of kfree Wang Ming
2023-07-17 10:47 ` Harald Freudenberger [this message]
2023-07-18 7:38 ` Heiko Carstens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4206a7e79f32538e2505722ef4b57386@linux.ibm.com \
--to=freude@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=davem@davemloft.net \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=machel@vivo.com \
--cc=opensource.kernel@vivo.com \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox