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: <E6C0F9F8-B024-45DB-BD53-2BB964EC7703@nvidia.com>
Date: Thu, 18 Sep 2025 15:07:42 -0400
From: Zi Yan <ziy@...dia.com>
To: Lance Yang <lance.yang@...ux.dev>
Cc: akpm@...ux-foundation.org, david@...hat.com, lorenzo.stoakes@...cle.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 18 Sep 2025, at 1:04, 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>
> ---
>  include/linux/swapops.h | 6 ++++++
>  mm/madvise.c            | 6 ------
>  2 files changed, 6 insertions(+), 6 deletions(-)
>
LGTM. Reviewed-by: Zi Yan <ziy@...dia.com>

Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ