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: <20250902195949.pfjv55in3cdhxhfg@master>
Date: Tue, 2 Sep 2025 19:59:49 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: David Hildenbrand <david@...hat.com>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v2 1/2] selftests/mm: split_huge_page_test: fix
 occasional is_backed_by_folio() wrong results

On Tue, Sep 02, 2025 at 06:25:35PM +0200, David Hildenbrand wrote:
>When checking for actual tail or head pages of a folio, we must make
>sure that the KPF_COMPOUND_HEAD/KPF_COMPOUND_TAIL flag is paired with
>KPF_THP.
>
>For example, if we have another large folio after our large folio in
>physical memory, our "pfn_flags & (KPF_THP | KPF_COMPOUND_TAIL" would
                                                               ^
One nit here, we missed                                        )

>trigger even though it's actually a head page of the next folio.
>
>If is_backed_by_folio() returns a wrong result, split_pte_mapped_thp()
>can fail with "Some THPs are missing during mremap".
>
>Fix it by checking for head/tail pages of folios properly. Add
>folio_tail_flags/folio_head_flags to improve readability and use these
>masks also when just testing for any compound page.
>
>Fixes: 169b456b0162 ("selftests/mm: reimplement is_backed_by_thp() with more precise check")
>Signed-off-by: David Hildenbrand <david@...hat.com>

Otherwise, 

Reviewed-by: Wei Yang <richard.weiyang@...il.com>

-- 
Wei Yang
Help you, Help me

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ