Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects

Matthew Wilcox
2020-04-06T17:26:28Z

On Mon, Apr 06, 2020 at 10:20:24AM -0700, Joe Perches wrote:
> > You really don't seem to get the whole "kzfree() has absolutely
> > _nothing_ to do with kzalloc() apart from a dubious implementation
> > details".
>
> API function naming symmetry is good.

It's good when there's actual symmetry between the two functions.

kvalloc() memory should be freed with kvfree(). That makes
sense. kzalloc() memory should not normally be freed with kzfree().
The symmetry hurts you, not helps you.