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: <Y/1B3BhgZp5aHry6@casper.infradead.org>
Date:   Mon, 27 Feb 2023 23:50:52 +0000
From:   Matthew Wilcox <willy@...radead.org>
To:     John David Anglin <dave.anglin@...l.net>
Cc:     linux-mm@...ck.org, linux-arch@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        "James E.J. Bottomley" <James.Bottomley@...senpartnership.com>,
        Helge Deller <deller@....de>, linux-parisc@...r.kernel.org
Subject: Re: [PATCH v2 17/30] parisc: Implement the new page table range API

On Mon, Feb 27, 2023 at 05:49:18PM -0500, John David Anglin wrote:
> > @@ -104,13 +104,17 @@ __update_cache(pte_t pte)
> >   	if (!pfn_valid(pfn))
> >   		return;
> > -	page = pfn_to_page(pfn);
> > -	if (page_mapping_file(page) &&
> > -	    test_bit(PG_dcache_dirty, &page->flags)) {
> > -		flush_kernel_dcache_page_addr(pfn_va(pfn));
> > -		clear_bit(PG_dcache_dirty, &page->flags);
> > +	folio = page_folio(pfn_to_page(pfn));
> > +	pfn = folio_pfn(folio);
> > +	nr = folio_nr_pages(folio);
> > +	if (folio_flush_mapping(folio) &&
> Shouldn't this call be to folio_mapping()?

For pages in the swap cache, folio_mapping() will return the swap cache
mapping, which isn't what we want.  folio_file_mapping() will return the
swap file mapping, which is also not what we want.  folio_flush_mapping()
returns NULL, which is what we want.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ