lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090325142006.3ba0ee10.akpm@linux-foundation.org>
Date:	Wed, 25 Mar 2009 14:20:06 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Thomas Gleixner <tglx@...utronix.de>
Cc:	Pekka Enberg <penberg@...helsinki.fi>,
	Steven Rostedt <rostedt@...dmis.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...e.hu>,
	Peter Zijlstra <peterz@...radead.org>,
	Roland McGrath <roland@...hat.com>,
	Nick Piggin <nickpiggin@...oo.com.au>,
	Steven Rostedt <srostedt@...hat.com>,
	Christoph Lameter <cl@...ux-foundation.org>,
	Matt Mackall <mpm@...enic.com>
Subject: Re: [PATCH 2/5] mm: remove unlikly NULL from kfree

On Wed, 25 Mar 2009 08:50:44 +0100 (CET) Thomas Gleixner <tglx@...utronix.de> wrote:

> On Wed, 25 Mar 2009, Pekka Enberg wrote:
> > On Wed, Mar 25, 2009 at 7:19 AM, Steven Rostedt <rostedt@...dmis.org> wrote:
> > > This makes sense, since we now encourage developers to just call kfree
> > > without checking for NULL.
> > 
> > But those are _error handling paths_ (at least supposed to be). I
> > wonder which call-sites are responsible for this. Can frtrace help us
> > here?
> 

-mm's profile-likely-unlikely-macros.patch gives the backtraces you're
looking for.

I agree, probably some particular callsite is doing something silly and
is skewing all the instrumentation.

We have at times identified callsites where kfree(0) is so likely that
"remove the NULL test" was an undesirable change.

Many many many kfree() callsites _know_ that the pointer isn't NULL. 
Having that test in kfree() was always stupid.  What we should do is to
have a kfree_it_isnt_null() for those callsites so they can omit the test
altogether.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ