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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 1 Jul 2019 16:40:26 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Michel Lespinasse <walken@...gle.com>
Cc:     Davidlohr Bueso <dave@...olabs.net>,
        David Howells <dhowells@...hat.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] augmented rbtree: rework the RB_DECLARE_CALLBACKS
 macro definition

On Mon, Jul 01, 2019 at 09:46:30AM +0200, Peter Zijlstra wrote:
> On Fri, Jun 28, 2019 at 05:49:52PM -0700, Michel Lespinasse wrote:

> > The motivation for this change is that I want to introduce augmented rbtree
> > uses where the augmented data for the subtree is a struct instead of a scalar.

> Can't we have a helper macro that converts an old (scalar) style compute
> into a new style compute and avoid this unfortunate and error prone
> copy/pasta ?

Or add a RBEQUAL argument that does:

-		if (node->RBAUGMENTED == augmented)
+		if (RBEQUAL(&node->RBAUGMENTED, &augmented))

With a bit of foo you can even provide a default implementation that
does: *a == *b.

See GEN_UNARY_RMWcc() for how to do that.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ