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: <YJ5TrReBMXwCqJFE@hirez.programming.kicks-ass.net>
Date:   Fri, 14 May 2021 12:40:45 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Liam Howlett <liam.howlett@...cle.com>
Cc:     "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Song Liu <songliubraving@...com>,
        Davidlohr Bueso <dave@...olabs.net>,
        "Paul E . McKenney" <paulmck@...nel.org>,
        Matthew Wilcox <willy@...radead.org>,
        Laurent Dufour <ldufour@...ux.ibm.com>,
        David Rientjes <rientjes@...gle.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Suren Baghdasaryan <surenb@...gle.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        Rik van Riel <riel@...riel.com>,
        Michel Lespinasse <walken.cr@...il.com>
Subject: Re: [PATCH 26/94] Maple Tree: Add new data structure

On Wed, Apr 28, 2021 at 03:36:02PM +0000, Liam Howlett wrote:

> +/* Flags:
> + * MAPLE_ALLOC_RANGE	Use allocation ranges (tracks gaps) in this tree
> + * MAPLE_USE_RCU	Operate in read/copy/update mode for multi-readers.
> + * MAPLE_HEIGHT_OFFSET	The position of the tree height in the flags
> + * MAPLE_HEIGHT_MASK	The mask for the maple tree height value.
> + */

Regular comment style would be:

/*
 * Flags:
 ...
 */

> +#define MAPLE_ALLOC_RANGE	1	// Bit 0
> +#define MAPLE_USE_RCU		2	// Bit 1
> +#define	MAPLE_HEIGHT_OFFSET	2	// Bit 2
> +#define	MAPLE_HEIGHT_MASK	60	// Bits 2-5

Can we pretty please keep masks in hex, like:

#define MAPLE_HEIGHT_MASK	0x3c

Because then it's instantly obvious is it bits 2-5.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ