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: <20201215164540.GB385334@cmpxchg.org>
Date:   Tue, 15 Dec 2020 17:45:40 +0100
From:   Johannes Weiner <hannes@...xchg.org>
To:     Kirill Tkhai <tkhai@...ru>
Cc:     Yang Shi <shy828301@...il.com>, "guro@...com" <guro@...com>,
        "ktkhai@...tuozzo.com" <ktkhai@...tuozzo.com>,
        "shakeelb@...gle.com" <shakeelb@...gle.com>,
        "david@...morbit.com" <david@...morbit.com>,
        "mhocko@...e.com" <mhocko@...e.com>,
        "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [v2 PATCH 3/9] mm: vmscan: guarantee shrinker_slab_memcg() sees
 valid shrinker_maps for online memcg

On Tue, Dec 15, 2020 at 03:58:06PM +0300, Kirill Tkhai wrote:
> 15.12.2020, 15:40, "Johannes Weiner" <hannes@...xchg.org>:
> > On Mon, Dec 14, 2020 at 02:37:16PM -0800, Yang Shi wrote:
> >>  The shrink_slab_memcg() races with mem_cgroup_css_online(). A visibility of CSS_ONLINE flag
> >>  in shrink_slab_memcg()->mem_cgroup_online() does not guarantee that we will see
> >>  memcg->nodeinfo[nid]->shrinker_maps != NULL. This may occur because of processor reordering
> >>  on !x86.
> >>
> >>  This seems like the below case:
> >>
> >>             CPU A CPU B
> >>  store shrinker_map load CSS_ONLINE
> >>  store CSS_ONLINE load shrinker_map
> >>
> >>  So the memory ordering could be guaranteed by smp_wmb()/smp_rmb() pair.
> >>
> >>  The memory barriers pair will guarantee the ordering between shrinker_deferred and CSS_ONLINE
> >>  for the following patches as well.
> >>
> >>  Signed-off-by: Yang Shi <shy828301@...il.com>
> >
> > As per previous feedback, please move the misplaced shrinker
> > allocation callback from .css_online to .css_alloc. This will get you
> > the necessary ordering guarantees from the cgroup core code.
> 
> 
> Can you read my emails from ktkhai@...tuozzo.com? I've already answered
> on this question here: https://lkml.org/lkml/2020/12/10/726
> 
> Check your spam folder, and add my address to allow-list if so.

It was indeed in my spam folder. Disregard what I wrote above.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ