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] [day] [month] [year] [list]
Message-Id: <20120606182938.f8f6178d.akpm@linux-foundation.org>
Date:	Wed, 6 Jun 2012 18:29:38 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Roland Dreier <roland@...nel.org>
Cc:	Joern Engel <joern@...fs.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] btree: Fix tree corruption in btree_get_prev()

On Wed, 6 Jun 2012 17:44:20 -0700 Roland Dreier <roland@...nel.org> wrote:

> On Wed, Jun 6, 2012 at 4:36 PM, Roland Dreier <roland@...nel.org> wrote:
> > On the other hand, your change makes me think we don't
> > even need a separate iterator (and we can avoid the variable
> > length array declaration)
> 
> FWIW with that change on top of my patch, I see
> 
> add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-123 (-123)
> function                                     old     new   delta
> btree_get_prev                               646     523    -123
> 
> on x86-64, so avoiding the variable length array is definitely
> worth something.
> 
> So the issue for me is whether messing with the caller's
> __key storage is OK, or if it's worth having a temporary
> local variable.
> 

Sometimes altering the caller's *__key when lookup fails is pretty rude
behavior :(

Perhaps we could add an arg to btree_get_prev(), provide it with
separate input and output key pointers?
--
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