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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Apr 2020, David Howells wrote:

> David Rientjes <rientjes@xxxxxxxxxx> 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.
> 

Ah lol, yeah.  Probably just better to do

	if (unlikely(ZERO_OR_NULL_PTR(addr)))
		return;

but I agree that mm.h is likely not the right spot.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux