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, 21 Sep 2023 14:47:31 -0400
From:   "Liam R. Howlett" <Liam.Howlett@...cle.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        maple-tree@...ts.infradead.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, pedro.falcato@...il.com,
        stable <stable@...nel.org>
Subject: Re: [PATCH 2/2] maple_tree: Add MAS_UNDERFLOW and MAS_OVERFLOW states

* Matthew Wilcox <willy@...radead.org> [230921 14:40]:
> On Thu, Sep 21, 2023 at 02:12:36PM -0400, Liam R. Howlett wrote:
> > Since MAS_NONE is used for handling of the maple tree when it's a single
> > entry at 0 (just a pointer), changing the handling of MAS_NONE in
> > mas_find() would make the code more complicated and error prone.
> 
> Single entry at index 0 is MAS_ROOT, not MAS_NONE.

Ah, sorry.  I didn't explain this well.  We end up in MAS_NONE when we
search from MAS_ROOT upwards.. that is, there's a value only at 0 and we
request 1 - ULONG_MAX, or we've called mas_find() with an index > 0.  So
there is no node in the tree for this entry.

The complication arises when mas_prev(), mas_next() or
mas_walk()/mas_find() has already set MAS_NONE, then we can't tell the
difference and so we don't really know what the Right Thing to do would
be.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ