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]
Message-ID: <YNU4AALw2QLZ06ML@casper.infradead.org>
Date:   Fri, 25 Jun 2021 02:57:20 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Christoph Hellwig <hch@...radead.org>
Cc:     akpm@...ux-foundation.org, linux-fsdevel@...r.kernel.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 43/46] mm/filemap: Add filemap_add_folio

On Wed, Jun 23, 2021 at 01:30:04PM +0200, Christoph Hellwig wrote:
> On Tue, Jun 22, 2021 at 01:15:48PM +0100, Matthew Wilcox (Oracle) wrote:
> > Pages being added to the page cache should already be folios, so
> > just cast the page to a folio in the add_to_page_cache_lru() wrapper.
> > Saves 96 bytes of text.
> 
> modulo the casting:

ok.  Moved add_to_page_cache_lru() into folio-compat.c, added the call
to page_folio() and also added:

        if (!huge) {
+               VM_BUG_ON_FOLIO(index & (folio_nr_pages(folio) - 1), folio);
                error = folio_charge_cgroup(folio, current->mm, gfp);

as we don't want pages added at an unaligned index in the file.

> Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ