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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1910311115540.226869@chino.kir.corp.google.com>
Date:   Thu, 31 Oct 2019 11:16:07 -0700 (PDT)
From:   David Rientjes <rientjes@...gle.com>
To:     Roman Gushchin <guro@...com>
cc:     linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        linux-kernel@...r.kernel.org, kernel-team@...com,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Daniel Jordan <daniel.m.jordan@...cle.com>
Subject: Re: [PATCH v2] mm: slab: make page_cgroup_ino() to recognize
 non-compound slab pages properly

On Wed, 30 Oct 2019, Roman Gushchin wrote:

> page_cgroup_ino() doesn't return a valid memcg pointer for non-compound
> slab pages, because it depends on PgHead AND PgSlab flags to be set
> to determine the memory cgroup from the kmem_cache.
> It's correct for compound pages, but not for generic small pages. Those
> don't have PgHead set, so it ends up returning zero.
> 
> Fix this by replacing the condition to PageSlab() && !PageTail().
> 
> Before this patch:
> [root@...alhost ~]# ./page-types -c /sys/fs/cgroup/user.slice/user-0.slice/user@...ervice/ | grep slab
> 0x0000000000000080	        38        0  _______S___________________________________	slab
> 
> After this patch:
> [root@...alhost ~]# ./page-types -c /sys/fs/cgroup/user.slice/user-0.slice/user@...ervice/ | grep slab
> 0x0000000000000080	       147        0  _______S___________________________________	slab
> 
> Fixes: 4d96ba353075 ("mm: memcg/slab: stop setting page->mem_cgroup pointer for slab pages")
> Signed-off-by: Roman Gushchin <guro@...com>
> Reviewed-by: Shakeel Butt <shakeelb@...gle.com>
> Cc: Vladimir Davydov <vdavydov.dev@...il.com>
> Cc: Daniel Jordan <daniel.m.jordan@...cle.com>

Acked-by: David Rientjes <rientjes@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ