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]
Date:   Wed, 30 Oct 2019 21:35:19 +0000
From:   Roman Gushchin <guro@...com>
To:     Daniel Jordan <daniel.m.jordan@...cle.com>
CC:     "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Michal Hocko <mhocko@...nel.org>,
        Johannes Weiner <hannes@...xchg.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Kernel Team <Kernel-team@...com>,
        Vladimir Davydov <vdavydov.dev@...il.com>,
        Shakeel Butt <shakeelb@...gle.com>
Subject: Re: [PATCH] mm: slab: make page_cgroup_ino() to recognize
 non-compound slab pages properly

On Wed, Oct 30, 2019 at 05:03:14PM -0400, Daniel Jordan wrote:
> Hi Roman,
> 
> On Fri, Oct 25, 2019 at 04:27:10PM -0700, Roman Gushchin wrote:
> > page_cgroup_ino() doesn't return a valid memcg pointer for non-compund
> > 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().
> 
> You may also want to update the comment above memcg_from_slab_page():
> 
>  * So this function assumes that the page can pass PageHead() and PageSlab()
>  * checks.

Good catch, thank you! Will send v2 in no time.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ