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: <747ff31c-6c9e-df6c-f14d-c43aa1c77b4a@redhat.com>
Date:   Thu, 20 Jan 2022 15:15:37 +0100
From:   David Hildenbrand <david@...hat.com>
To:     "zhangliang (AG)" <zhangliang5@...wei.com>
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Linux-MM <linux-mm@...ck.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        wangzhigang17@...wei.com, Matthew Wilcox <willy@...radead.org>,
        Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH] mm: reuse the unshared swapcache page in do_wp_page

On 17.01.22 14:31, zhangliang (AG) wrote:
> Sure, I will do that :)

I'm polishing up / testing the patches and might send something out for discussion shortly.
Just a note that on my branch was a version with a wrong condition that should have been fixed now.

I am still thinking about PTE mapped THP. For these, we'll always
have page_count() > 1, essentially corresponding to the number of still-mapped sub-pages.

So if we end up with a R/O mapped part of a THP, we'll always have to COW and cannot reuse ever,
although it's really just a single process mapping the THP via PTEs.

One approach would be to scan the currently locked page table for entries mapping
this same page. If page_count() corresponds to that value, we know that only we are
mapping the THP and there are no additional references. That would be a special case
if we find an anon THP in do_wp_page(). Hm.

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ