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:   Tue, 31 Oct 2023 09:13:44 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     Gregory Price <gregory.price@...verge.com>
Cc:     Gregory Price <gourry.memverge@...il.com>, linux-mm@...ck.org,
        akpm@...ux-foundation.org, david@...hat.com, vbabka@...e.cz,
        naoya.horiguchi@...ux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] kpageflags: respect folio head-page flag placement

On Mon, Oct 30, 2023 at 07:41:23PM -0400, Gregory Price wrote:
> On Mon, Oct 30, 2023 at 11:22:18PM +0000, Matthew Wilcox wrote:
> > On Mon, Oct 30, 2023 at 02:00:05PM -0400, Gregory Price wrote:
> > > kpageflags reads page-flags directly from the page, even when the
> > > respective flag is only updated on the headpage of a folio.
> > > 
> > > Update bitchecks to use PAGEFLAG() interfaces to check folio for the
> > > referenced, dirty, lru, active, and unevictable bits.
> > 
> > But uptodate, writeback and reclaim (amongst others) are also defined
> > only on the head page.
> > 
> 
> Ah yes i was only looking at the things defined w/ PAGEFLAG defines in
> page-flags.h. I'll give it full once over can collect them all, my bad.
> 
> (also i forgot to update my commit message)
> 
> Quick question here since i have your attention: any recommendation on
> what to do for ONLY_HEAD flags?  If the provided page is not the head,
> should the flag report 0... or whatever the head says?

Thinking about it some more, really almost all flags are per-folio, not
per-page.  The only exceptions are HWPoison and AnonExclusive.  So
probably the right way to do this is to make k = folio->flags, and
then just change a few places rather than changing all the places that
test 'k'.

Powered by blists - more mailing lists