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

Joe Perches
2020-04-06T16:44:54Z

On Mon, 2020-04-06 at 09:41 -0700, Linus Torvalds wrote:
> On Mon, Apr 6, 2020 at 9:12 AM Joe Perches <joe@perches.com> wrote:
> > While I agree with Linus about the __ prefix,
> > the z is pretty common and symmetric to all
> > the <foo>zalloc uses.
>
> Yes, we have a pattern of 'z' for zero.
>
> But the _operation_ isn't symmetric.
>
> "kzalloc()" has absolutely _nothing_ to do with "kzfree()". They are
> not some kind of "opposite symmetric operation". They are totally
> different. They have absolutely nothing in common.

Dubious assertion. Both end up with zeroed memory.