[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6504.1586159053@warthog.procyon.org.uk>
Date: Mon, 06 Apr 2020 08:44:13 +0100
From: David Howells <dhowells@...hat.com>
To: David Rientjes <rientjes@...gle.com>
Cc: dhowells@...hat.com, Waiman Long <longman@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>, linux-mm@...ck.org,
keyrings@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] mm: Add kvfree_sensitive() for freeing sensitive data objects
David Rientjes <rientjes@...gle.com> wrote:
> > +static inline void kvfree_sensitive(const void *addr, size_t len)
> > +{
> > + if (addr) {
>
> Shouldn't this be if (unlikely(ZERO_OR_NULL_PTR(addr))?
You've reversed the logic - it needs a '!' there.
David
Powered by blists - more mailing lists