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]
Message-ID: <20250923022901.mzjqkrkdrwn2r7n2@master>
Date: Tue, 23 Sep 2025 02:29:01 +0000
From: Wei Yang <richard.weiyang@...il.com>
To: Lance Yang <lance.yang@...ux.dev>
Cc: akpm@...ux-foundation.org, david@...hat.com, lorenzo.stoakes@...cle.com,
	ziy@...dia.com, baolin.wang@...ux.alibaba.com,
	Liam.Howlett@...cle.com, npache@...hat.com, ryan.roberts@....com,
	dev.jain@....com, baohua@...nel.org, ioworker0@...il.com,
	kirill@...temov.name, hughd@...gle.com, mpenttil@...hat.com,
	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	Kairui Song <kasong@...cent.com>
Subject: Re: [PATCH mm-new v2 1/2] mm: make is_guard_pte_marker() available
 for hugepage collapse

On Thu, Sep 18, 2025 at 01:04:30PM +0800, Lance Yang wrote:
>From: Lance Yang <lance.yang@...ux.dev>
>
>The hugepage collapsing code needs is_guard_pte_marker() to correctly
>handle PTE guard markers. Move the helper to a shared header and expose
>it.
>
>While at it, simplify the implementation. The current code is redundant
>as it effectively expands to:
>
>  is_swap_pte(pte) &&
>  is_pte_marker_entry(...) && // from is_pte_marker()
>  is_pte_marker_entry(...)    // from is_guard_swp_entry()
>
>While a modern compiler could likely optimize this away, let's have clean
>code and not rely on it.
>
>Cc: Kairui Song <kasong@...cent.com>
>Acked-by: David Hildenbrand <david@...hat.com>
>Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
>Signed-off-by: Lance Yang <lance.yang@...ux.dev>

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