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:   Fri, 15 Nov 2019 18:40:31 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Tejun Heo <tj@...nel.org>
Cc:     Roman Gushchin <guro@...com>,
        Michal Koutný <mkoutny@...e.com>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Johannes Weiner <hannes@...xchg.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH 1/2] mm: memcg: switch to css_tryget() in
 get_mem_cgroup_from_mm()

On Thu 14-11-19 11:37:36, Tejun Heo wrote:
> Hello,
> 
> On Thu, Nov 14, 2019 at 08:33:40PM +0100, Michal Hocko wrote:
> > > It is useful for controlling admissions of new userspace visible uses
> > > - e.g. a tracepoint shouldn't be allowed to be attached to a cgroup
> > > which has already been deleted.
> > 
> > I am not sure I understand. Roman says that the cgroup can get offline
> > right after the function returns. How is "already deleted" different
> > from "just deleted"? I thought that the state is preserved at least
> > while the rcu lock is held but my memory is dim here.
> 
> It's the same difference as between "opening a file and deleting it"
> and "deleting a file and opening it".

I am sorry but I do not follow. How can css_tryget_online provide the
same semantic when the css can go offline right after the tryget call
returns so it is effectivelly undistinguishable from the case when the
css was already online before the call was made. Or is my understanding
of what Roman's said earlier in the thread?

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ