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]
Date:   Wed, 22 Sep 2021 15:33:29 -0400
From:   Peter Xu <peterx@...hat.com>
To:     linux-kernel@...r.kernel.org, linux-mm@...ck.org
Cc:     Andrew Morton <akpm@...ux-foundation.org>,
        Andrea Arcangeli <aarcange@...hat.com>,
        Axel Rasmussen <axelrasmussen@...gle.com>,
        Hugh Dickins <hughd@...gle.com>,
        Nadav Amit <nadav.amit@...il.com>
Subject: Re: [PATCH] mm/khugepaged: Detecting uffd-wp vma more efficiently

On Wed, Sep 22, 2021 at 01:51:56PM -0400, Peter Xu wrote:
> Axel: as I asked in the other thread, please help check whether minor mode will
> work properly with shmem thp enabled.  If not, I feel like this patch could be
> part of that effort at last, but it's also possible that I missed something.

Hmm, this seems to be a false-alarm too.

UFFDIO_CONTINUE is fine with thp because shmem_getpage() only returns small
pages.

Khugepaged is fine too on merging small shmem pages into thps, the same reason
as uffd-wp: it zaps ptes only, so previous pte_none() ptes will keep the same,
it makes sure all old pte_none ptes will not continue until a UFFDIO_CONTINUE.

The only last problem is when khugepaged merged small ptes into a thp, then it
could zap ptes even if they existed before.  So for minor mode fault, the uffd
service thread needs to be prepared for false positive messages.

That shouldn't be a problem either, because file-backed memory pgtables are
unstable and prone to lost, so uffd minor fault handler should always be
prepared for false positives anyway..

In summary: please feel free to ignore the above note, and sorry for the noise.

-- 
Peter Xu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ