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: <2C382EC0-0FB7-4882-8B87-E467454178D2@nvidia.com>
Date: Wed, 04 Feb 2026 10:48:00 -0500
From: Zi Yan <ziy@...dia.com>
To: Boudewijn van der Heide <boudewijn@...ta-utec.com>
Cc: jiaqiyan@...gle.com, Liam.Howlett@...cle.com, akpm@...ux-foundation.org,
 david@...hat.com, duenwen@...gle.com, hannes@...xchg.org,
 harry.yoo@...cle.com, jackmanb@...gle.com, jane.chu@...cle.com,
 jthoughton@...gle.com, linmiaohe@...wei.com, linux-kernel@...r.kernel.org,
 linux-mm@...ck.org, lorenzo.stoakes@...cle.com, mhocko@...e.com,
 muchun.song@...ux.dev, nao.horiguchi@...il.com, osalvador@...e.de,
 rientjes@...gle.com, rppt@...nel.org, surenb@...gle.com, tony.luck@...el.com,
 vbabka@...e.cz, wangkefeng.wang@...wei.com, william.roche@...cle.com,
 willy@...radead.org
Subject: Re: [PATCH v4 0/3] Only free healthy pages in high-order
 has_hwpoisoned folio

On 4 Feb 2026, at 10:23, Boudewijn van der Heide wrote:

> Hi Jiaqi,
> Thanks for including the THP scenario.
>
>> Another similar situation is when a transparent huge page (THP)
>> is handled by MFR but splitting failed. Such THP will eventually
>> be released to buddy allocator when owning userspace processes
>> are gone, but with certain subpages having HWPoison [9].
>
> I think for failed-split THP, we need to do the following to support them:
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index cf0d526e6d41..3f727038f400 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2479,6 +2479,7 @@ int memory_failure(unsigned long pfn, int flags)
>  		if (err || new_order) {
>  			/* get folio again in case the original one is split */
>  			folio = page_folio(p);
> +			folio_set_has_hwpoisoned(folio);
>  			res = -EHWPOISON;
>  			kill_procs_now(p, pfn, flags, folio);
>  			put_page(p);
>
> We set the PG_has_hwpoison flag here again,
> because when the split partially succeeds (new_order > 0),
> page_folio(p) returns a new smaller-order folio that doesn't have the flag set.

No, split code[1] sets has_hwpoison flag when it split a folio to a non-0 order
folios. If you do not see it in your kernel code, you might need to update
your kernel to latest stable one or one newer than or equal to 6.18.


[1] https://elixir.bootlin.com/linux/v6.18/source/mm/huge_memory.c#L3343


Best Regards,
Yan, Zi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ