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: <YMnmm+fhICQONpWS@casper.infradead.org>
Date:   Wed, 16 Jun 2021 12:55:07 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     David Howells <dhowells@...hat.com>
Cc:     akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@....de>,
        Jeff Layton <jlayton@...nel.org>,
        "Kirill A . Shutemov" <kirill.shutemov@...ux.intel.com>,
        Vlastimil Babka <vbabka@...e.cz>,
        William Kucharski <william.kucharski@...cle.com>
Subject: Re: [PATCH v11 26/33] mm/writeback: Add folio_wait_writeback()

On Wed, Jun 16, 2021 at 11:30:46AM +0100, David Howells wrote:
> Matthew Wilcox (Oracle) <willy@...radead.org> wrote:
> 
> > +	struct page *page = &folio->page;
> 
> Isn't that a layering violation?  Should it be something like:
> 
> 	struct page *page = folio_head();
> 
> or:
> 
> 	struct page *page = folio_subpage(0);

It's not a layering violation, but it is bad style.  It indicates the
function is incompletely converted to folios and probably isn't actually
folio-safe.  After about a dozen more commits, it's possible to finish
the conversion in afs_page_mkwrite(), and I do so here:

https://git.infradead.org/users/willy/pagecache.git/commitdiff/f49f546f4ad83c8a6fec861af5f9d0825b850abc

It's still not 100% clean as afs_page_dirty() expects a head|base page
instead of a folio, so there's more cleanup required.  Also
trace_afs_page_dirty() continues to take a page instead of a folio,
but that tends to not actually be a problem.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ