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: <ae8ea59e-3081-072b-faa0-b67a5d5af047@redhat.com>
Date:   Wed, 16 Aug 2023 20:51:49 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     Peter Xu <peterx@...hat.com>, linux-kernel@...r.kernel.org,
        linux-mm@...ck.org, Hugh Dickins <hughd@...gle.com>,
        "Kirill A . Shutemov" <kirill@...temov.name>,
        Randy Dunlap <rdunlap@...radead.org>,
        Mike Kravetz <mike.kravetz@...cle.com>,
        Yu Zhao <yuzhao@...gle.com>,
        Ryan Roberts <ryan.roberts@....com>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Yang Shi <shy828301@...il.com>
Subject: Re: [PATCH RFC v3] mm: Proper document tail pages fields for folio

On 16.08.23 20:41, Matthew Wilcox wrote:
> On Wed, Aug 16, 2023 at 03:33:30PM +0200, David Hildenbrand wrote:
>> My simple tests passed so far. If there isn't something obvious missing,
>> I can do more testing and send this as an official patch.
> 
> I think you missed one:
> 
> +++ b/mm/swapfile.c
> @@ -1490,7 +1490,7 @@ int swp_swapcount(swp_entry_t entry)
> 
>          page = vmalloc_to_page(p->swap_map + offset);
>          offset &= ~PAGE_MASK;
> -       VM_BUG_ON(page_private(page) != SWP_CONTINUED);
> +       VM_BUG_ON(page_swap_entry(page).val != SWP_CONTINUED);

That falls under the "weird handling of SWP_CONTINUED using vmalloced 
pages". So different user of page_private().

Note that we don't even store swap entries in there but extended swap 
counts.

> 
>          do {
>                  page = list_next_entry(page, lru);
> 
> I'm not smart enough to understand the use of the one in
> add_swap_count_continuation().  Maybe that also needs to be fixed?

No, that's independent of THP_SWAP, we're not working on the memmap of 
the THP but some weird extension of swap counts.

Thanks for having a look!

-- 
Cheers,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ