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]
Date:	Thu, 14 Dec 2006 16:35:19 -0800
From:	Andrew Morton <akpm@...l.org>
To:	ebiederm@...ssion.com (Eric W. Biederman)
Cc:	"Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com>,
	"Eric Dumazet" <dada1@...mosbay.com>, "Greg KH" <gregkh@...e.de>,
	"Arjan" <arjan@...ux.intel.com>,
	"linux-kernel" <linux-kernel@...r.kernel.org>
Subject: Re: kref refcnt and false positives

On Thu, 14 Dec 2006 17:19:55 -0700
ebiederm@...ssion.com (Eric W. Biederman) wrote:

> "Pallipadi, Venkatesh" <venkatesh.pallipadi@...el.com> writes:
> 
> >>But I believe Venkatesh problem comes from its release() 
> >>function : It is 
> >>supposed to free the object.
> >>If not, it should properly setup it so that further uses are OK.
> >>
> >>ie doing in release(kref)
> >>atomic_set(&kref->count, 0);
> >>
> >
> > Agreed that setting kref refcnt to 0 in release will solve the probloem.
> > But, once the optimization code is removed, we don't need to set it to
> > zero as release will only be called after the count reaches zero anyway.
> 
> The primary point of the optimization is to not write allocate a cache line
> unnecessarily.   I don't know it's value, but it can have one especially
> on big way SMP machines.

Guys, we have about 1000000000000000000000000000000 reports of weirdo
crashes, smashes, bashes and splats in the kref code.  The last thing we
need is some obscure, tricksy little optimisation which leads legitimate
uses of the API to mysteriously fail.  

If we are allocating and freeing kref-counted objects at a sufficiently
high frequency for this thing to make a difference then we should fix that
instead of trying to suck faster.
-
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