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:   Fri, 12 May 2023 16:08:57 -0700
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     "Liam R. Howlett" <Liam.Howlett@...cle.com>
Cc:     maple-tree@...ts.infradead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 28/35] maple_tree: Add mas_next_range() and
 mas_find_range() interfaces

On Fri, 12 May 2023 14:20:29 -0400 "Liam R. Howlett" <Liam.Howlett@...cle.com> wrote:

> Some users of the maple tree may want to move to the next range in the
> tree, even if it stores a NULL.  This family of function provides that
> functionality by advancing one slot at a time and returning the result,
> while mas_contiguous() will iterate over the range and stop on
> encountering the first NULL.
> 
> ...
>  
> +/**
> + * mas_contiguous() - Iterate over a contiguous range of the maple tree.
> + * @__mas: Maple Tree operation state (maple_state)
> + * @__entry: Entry retrieved from the tree
> + * @__max: maximum index to retrieve from the tree
> + *
> + * When returned, mas->index and mas->last will hold the entire range of the
> + * entry.  The loop will terminate on the first NULL encountered.
> + *
> + * Note: may return the zero entry.
> + */
> +#define mas_contiguous(__mas, __entry, __max) \
> +	while (((__entry) = mas_find_range((__mas), (__max))) != NULL)
>  

I can's say I'm a fan of this.  The name doesn't imply that this is a
looping construct.  I can't say much more because mas_contiguous() has
no users..


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ