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: <20221216110139.fe9b0cc2951014e1856d0042@linux-foundation.org>
Date:   Fri, 16 Dec 2022 11:01:39 -0800
From:   Andrew Morton <akpm@...ux-foundation.org>
To:     Liam Howlett <liam.howlett@...cle.com>
Cc:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>,
        Andrei Vagin <avagin@...il.com>,
        "usama.anjum@...labora.com" <usama.anjum@...labora.com>,
        Mike Rapoport <rppt@...nel.org>
Subject: Re: [PATCH] maple_tree: Fix mas_spanning_rebalance() on
 insufficient data

On Fri, 16 Dec 2022 18:53:15 +0000 Liam Howlett <liam.howlett@...cle.com> wrote:

> Mike Rapoport contacted me off-list with a regression in running criu.
> Periodic tests fail with an RCU stall during execution.  Although rare,
> it is possible to hit this with other uses so this patch should be
> backported to fix the regression.
> 
> An insufficient node was causing an out-of-bounds access on the node in
> mas_leaf_max_gap().  The cause was the faulty detection of the new node
> being a root node when overwriting many entries at the end of the tree.
> 
> Fix the detection of a new root and ensure there is sufficient data
> prior to entering the spanning rebalance loop.
> 
> Add a testcase to the maple tree test suite for this issue.

Shall do.

> Cc: Andrei Vagin <avagin@...il.com>
> Cc: usama.anjum@...labora.com
> Reported-by: Mike Rapoport <rppt@...nel.org>
> Fixes: 54a611b60590 ("Maple Tree: add new data structure")
> Signed-off-by: Liam R. Howlett <Liam.Howlett@...cle.com>

I guess we want a cc:stable there?

>  lib/test_maple_tree.c | 23 +++++++++++++++++++++++

Belated review: all this code runs at __init time, so every dang
function in there really should be marked __init, data marked
__initdata, etc.  Like lib/test_bitmap.c.

I wonder if there's some trick we can do external to the .c file to
have the same effect.

Also, maple_tree_seed():set[] could be static ;).  So we don't have to
initialize it at runtime.  Better would be static const.  Nitpick.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ