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: <20251204015425.66988-1-lianux.mm@gmail.com>
Date: Thu,  4 Dec 2025 09:54:25 +0800
From: wang lian <lianux.mm@...il.com>
To: shivankg@....com
Cc: Branden.Moore@....com,
	Liam.Howlett@...cle.com,
	akpm@...ux-foundation.org,
	baohua@...nel.org,
	baolin.wang@...ux.alibaba.com,
	david@...nel.org,
	dev.jain@....com,
	lance.yang@...ux.dev,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	linux-trace-kernel@...r.kernel.org,
	lorenzo.stoakes@...cle.com,
	mathieu.desnoyers@...icios.com,
	mhiramat@...nel.org,
	npache@...hat.com,
	rostedt@...dmis.org,
	ryan.roberts@....com,
	ziy@...dia.com,
	zokeefe@...gle.com,
	wang lian <lianux.mm@...il.com>
Subject: Re: [PATCH V3 1/2] mm/khugepaged: map dirty/writeback pages failures to EAGAIN

> When collapse_file encounters dirty or writeback pages in file-backed
> mappings, it currently returns SCAN_FAIL which maps to -EINVAL. This is
> misleading as EINVAL suggests invalid arguments, whereas dirty/writeback
> pages represent transient conditions that may resolve on retry.
> 
> Introduce SCAN_PAGE_DIRTY_OR_WRITEBACK to cover both dirty and writeback
> states, mapping it to -EAGAIN. For MADV_COLLAPSE, this provides userspace
> with a clear signal that retry may succeed after writeback completes.
> For khugepaged, this is harmless as it will naturally revisit the range
> during periodic scans after async writeback completes.
> 
> Reported-by: Branden Moore <Branden.Moore@....com>
> Closes: https://lore.kernel.org/all/4e26fe5e-7374-467c-a333-9dd48f85d7cc@amd.com
> Fixes: 34488399fa08 ("mm/madvise: add file and shmem support to MADV_COLLAPSE")
> Reviewed-by: Dev Jain <dev.jain@....com>
> Reviewed-by: Lance Yang <lance.yang@...ux.dev>
> Signed-off-by: Shivank Garg <shivankg@....com>
> ---

LGTM.
Reviewed-by: wang lian <lianux.mm@...il.com>
--
Best Regards,
wang lian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ