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-next>] [day] [month] [year] [list]
Date:   Fri, 2 Jun 2023 13:38:44 +0100
From:   "Colin King (gmail)" <colin.i.king@...il.com>
To:     Nhat Pham <nphamcs@...il.com>, Seth Jennings <sjenning@...hat.com>,
        Dan Streetman <ddstreet@...e.org>,
        Vitaly Wool <vitaly.wool@...sulko.com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        Linux-MM <linux-mm@...ck.org>
Cc:     "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: re: zswap: do not shrink if cgroup may not zswap

Hi,

static analysis with clang scan build has detected an issue in the 
following commit:

commit 6804144bf1cfa3978ad98e625d8a1d2a4b80cbee
Author: Nhat Pham <nphamcs@...il.com>
Date:   Tue May 30 15:24:40 2023 -0700

     zswap: do not shrink if cgroup may not zswap


The issue is as follows in function zswap_frontswap_store in mm/zswap.c:

         /*
          * XXX: zswap reclaim does not work with cgroups yet. Without a
          * cgroup-aware entry LRU, we will push out entries system-wide 
based on
          * local cgroup limits.
          */
         objcg = get_obj_cgroup_from_page(page);
         if (objcg && !obj_cgroup_may_zswap(objcg))
                 goto reject;

mm/zswap.c:1210:6: warning: variable 'ret' is used uninitialized 
whenever 'if' condition is true [-Wsometimes-uninitialized]

The goto reject path ends up returning ret, however, ret at this point 
has not been initialized, so a garbage return value is being returned
by function zswap_frontswap_store

Colin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ