Re: [PATCH] KEYS: use kfree_sensitive with key

From: Herbert Xu
Date: Thu Jun 15 2023 - 05:15:11 EST


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@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt