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:   Thu, 20 Oct 2022 09:10:48 -0400
From:   Brian Foster <bfoster@...hat.com>
To:     Mel Gorman <mgorman@...hsingularity.net>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Yang Shi <shy828301@...il.com>,
        Matthew Wilcox <willy@...radead.org>,
        Linux-MM <linux-mm@...ck.org>,
        LKML <linux-kernel@...r.kernel.org>,
        "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>
Subject: Re: [RFC PATCH] mm/huge_memory: Do not clobber swp_entry_t during
 THP split

cc Kirill

On Thu, Oct 20, 2022 at 09:52:14AM +0100, Mel Gorman wrote:
> Adding Brian to cc
> 
> On Wed, Oct 19, 2022 at 04:18:10PM -0700, Andrew Morton wrote:
> > On Wed, 19 Oct 2022 11:17:14 -0700 Yang Shi <shy828301@...il.com> wrote:
> > 
> > > > The intent of commit b653db77350c patch was to avoid the case where
> > > > PG_private is clear but folio->private is not-NULL. However, THP tail
> > > > pages uses page->private for "swp_entry_t if folio_test_swapcache()" as
> > > > stated in the documentation for struct folio. This patch only clobbers
> > > > page->private for tail pages if the head page was not in swapcache and
> > > > warns once if page->private had an unexpected value.
> > > 
> > > It looks like the same issue fixed by
> > > https://lore.kernel.org/linux-mm/20220906190602.1626037-1-bfoster@redhat.com/
> > 
> > It is.
> > 
> 
> Yep, based on Brian's changelog, it was the same workload that triggered
> it as it happens to stress the corner case that hits the bug. 
> 
> > As I asked earlier this week, what about reverting b653db77350c?  Why
> > do we care about the value of ->private for non-PG_private pages?
> 
> I don't think we do care but based on the changelog of b653db77350c, it's
> part of an effort to either remove the PG_private bit or is a preparation
> step for casting page to a meaningful type based on context but only Matthew
> can tell us his motivation. There at least is some value to identifying
> cases where a referenced page has valid information in page->private that
> is not reflected in the flags.
> 

Thanks.

It would have been nice to have received some feedback on the patch I
had posted 6 weeks or so ago ;), but regardless yours is better and
includes the comment Kirill asked for (and also appears to be added to
the hotfixes tree), so FWIW:

Acked-by: Brian Foster <bfoster@...hat.com>

> -- 
> Mel Gorman
> SUSE Labs
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ