Keyrings Archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: "Adam, Mahmoud" <mngyadam@amazon.de>
Cc: Mahmoud Adam <mngyadam@amazon.com>,
	"dhowells@redhat.com" <dhowells@redhat.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"keyrings@vger.kernel.org" <keyrings@vger.kernel.org>,
	"linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] KEYS: use kfree_sensitive with key
Date: Thu, 15 Jun 2023 17:09:02 +0800	[thread overview]
Message-ID: <ZIrVLk73ulTPzOGq@gondor.apana.org.au> (raw)
In-Reply-To: <CB10C1D8-BA86-4E1B-B9B7-FDF6AFD3E089@amazon.de>

On Wed, Jun 14, 2023 at 01:32:51PM +0000, Adam, Mahmoud wrote:
>
> I think this holds for the other lines as well, I can use pkey->key_is_private to check for them also

That might be going a bit overboard.

So if the key is definitely public, then use kfree.  If we don't
know what it is (i.e., public or private), then just use kfree_sensitive.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      reply	other threads:[~2023-06-15  9:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-13 16:07 [PATCH] KEYS: use kfree_sensitive with key Mahmoud Adam
2023-06-14  9:49 ` Herbert Xu
2023-06-14 13:32   ` Adam, Mahmoud
2023-06-15  9:09     ` Herbert Xu [this message]

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=ZIrVLk73ulTPzOGq@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=keyrings@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mngyadam@amazon.com \
    --cc=mngyadam@amazon.de \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).