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: <20221026142259.mvcbtmj3kde5y25g@revolver>
Date:   Wed, 26 Oct 2022 14:23:19 +0000
From:   Liam Howlett <liam.howlett@...cle.com>
To:     Lukas Bulwahn <lukas.bulwahn@...il.com>
CC:     Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "maple-tree@...ts.infradead.org" <maple-tree@...ts.infradead.org>
Subject: Re: [PATCH 0/1] Dead stores in maple-tree

* Lukas Bulwahn <lukas.bulwahn@...il.com> [221026 08:01]:
> Dear maple-tree authors, dear Liam, dear Matthew,
> 
> there are some Dead Stores that clang-analyzer reports:
> 
> lib/maple_tree.c:2906:2: warning: Value stored to 'last' is never read [clang-analyzer-deadcode.DeadStores]
> lib/maple_tree.c:2907:2: warning: Value stored to 'prev_min' is never read [clang-analyzer-deadcode.DeadStores]
> 
> I addressed these two cases, which were most obvious and clear to fix;
> see patch of this one-element series.
> 
> Further, clang-analyzer reports more, which I did not address:
> 
> lib/maple_tree.c:332:2: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
> lib/maple_tree.c:337:2: warning: Value stored to 'node' is never read [clang-analyzer-deadcode.DeadStores]
> 
> Unclear to me if the tool is wrong or right in its analysis here for the two functions above.

The tool is correct but these aren't going anywhere.  They are compiled
out and are needed for the future.

> 
> lib/maple_tree.c:1212:23: warning: Value stored to 'nodep' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
> 
> A lot of pointer magic. Unclear to me if the tool is wrong or right in its analysis here.

Agreed, this is unclear.. I don't like it and it needs to be removed.
I'll send something out shortly. This was refactoring by the looks of it.

> 
> lib/maple_tree.c:5014:5: warning: Value stored to 'count' is never read [clang-analyzer-deadcode.DeadStores]
> 
> Unclear if the code is intended as it is now.
> 
> In mas_anode_descend(), the variable count is really just assigned and used once
> effectively. The second assignment is never read. So, the variable count could
> just be removed in mas_anode_descend().

This was probably left over from refactoring as well.  I will fix this
as well, thanks.

> 
> 
> Maybe these further warnings are helpful to clean up the code or find an issue
> that was overlooked so far.

Much appreciated,
Liam

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ