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] [day] [month] [year] [list]
Date:   Tue, 24 Oct 2023 15:09:26 +0800
From:   Yin Fengwei <fengwei.yin@...el.com>
To:     Hugh Dickins <hughd@...gle.com>,
        Andrew Morton <akpm@...ux-foundation.org>
CC:     Matthew Wilcox <willy@...radead.org>,
        Lorenzo Stoakes <lstoakes@...il.com>,
        Stefan Roesch <shr@...kernel.io>,
        <linux-kernel@...r.kernel.org>, <linux-mm@...ck.org>
Subject: Re: [PATCH] mm: mlock: avoid folio_within_range() on KSM pages

Hi Huge,

On 10/24/23 14:38, Hugh Dickins wrote:
> Since mm-hotfixes-stable commit dc68badcede4 ("mm: mlock: update
> mlock_pte_range to handle large folio") I've just occasionally seen
> VM_WARN_ON_FOLIO(folio_test_ksm) warnings from folio_within_range(),
> in a splurge after testing with KSM hyperactive.
> 
> folio_referenced_one()'s use of folio_within_vma() is safe because
> it checks folio_test_large() first; but allow_mlock_munlock() needs
> to do the same to avoid those warnings (or check !folio_test_ksm()
> itself? or move either check into folio_within_range()? hard to tell
> without more examples of its use).
Checking folio_test_large() here looks fine to me now. If KSM could support
large folio in the future (Not sure whether this will happen in the future),
we could revise.

> 
> Fixes: dc68badcede4 ("mm: mlock: update mlock_pte_range to handle large folio")
> Signed-off-by: Hugh Dickins <hughd@...gle.com>
Thanks a lot for catching this issue and fixing it.

Reviewed-by: Yin Fengwei <fengwei.yin@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ