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: <8f0ec2c7-e209-4664-822a-6d3785bfd4f4@lucifer.local>
Date: Mon, 10 Nov 2025 14:23:12 +0000
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: "Garg, Shivank" <shivankg@....com>
Cc: Matthew Wilcox <willy@...radead.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        David Hildenbrand <david@...hat.com>, Zi Yan <ziy@...dia.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.com>,
        "Liam R . Howlett" <Liam.Howlett@...cle.com>,
        Nico Pache <npache@...hat.com>, Ryan Roberts <ryan.roberts@....com>,
        Dev Jain <dev.jain@....com>, Barry Song <baohua@...nel.org>,
        Lance Yang <lance.yang@...ux.dev>,
        Steven Rostedt <rostedt@...dmis.org>,
        Masami Hiramatsu <mhiramat@...nel.org>,
        Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
        Zach O'Keefe <zokeefe@...gle.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, linux-trace-kernel@...r.kernel.org,
        Branden Moore <Branden.Moore@....com>
Subject: Re: [PATCH 1/2] mm/khugepaged: do synchronous writeback for
 MADV_COLLAPSE

On Mon, Nov 10, 2025 at 07:50:17PM +0530, Garg, Shivank wrote:
>
>
> On 11/10/2025 7:22 PM, Lorenzo Stoakes wrote:
> > On Mon, Nov 10, 2025 at 01:47:10PM +0000, Matthew Wilcox wrote:
> >> On Mon, Nov 10, 2025 at 11:32:53AM +0000, Shivank Garg wrote:
> >>> When MADV_COLLAPSE is called on file-backed mappings (e.g., executable
> >>> text sections), the pages may still be dirty from recent writes. The
> >>
> >> That explanation derails my brain entirely.  Text isn't writable!  How
> >> can the pages be dirty and file-backed text?
> >
> > Because they just compiled it and it's not been written back to disk yet :)
>
> Hi,
>
> It's not about compilation. My binaries are already compiled.
>
> The issue is copying those binary to a freshly mounted filesystem.
> The page cache folios remain dirty until background writeback completes.
>
> Reproduces 100% for me: fresh XFS/EXT4 mount -> copy binary -> execute -> MADV_COLLAPSE fails.
>
> Detail logs: https://lore.kernel.org/all/0b84865c-5b23-4be6-9902-af9d5e63c182@amd.com

It amounts to the same thing unless I'm missing something? You've done something
to write out the file and then immediately execute before writeback completes.

>
> Thanks,
> Shivank

Thanks, Lorenzo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ