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: <eb0c8d93-cd9f-4b57-a0f0-d30cdb5b31bc@lucifer.local>
Date: Wed, 25 Jun 2025 11:15:21 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: David Hildenbrand <david@...hat.com>
Cc: Baolin Wang <baolin.wang@...ux.alibaba.com>,
        Hugh Dickins <hughd@...gle.com>, akpm@...ux-foundation.org,
        ziy@...dia.com, Liam.Howlett@...cle.com, npache@...hat.com,
        ryan.roberts@....com, dev.jain@....com, baohua@...nel.org,
        zokeefe@...gle.com, shy828301@...il.com, usamaarif642@...il.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 0/2] fix MADV_COLLAPSE issue if THP settings are
 disabled

On Wed, Jun 25, 2025 at 12:07:12PM +0200, David Hildenbrand wrote:
> > Yes, I don't mean it will prevent madvise_collapse(), just as you said
> > that it could be problematic (it's horrible to try to collapse 512MB).
>
> Well, assume you have a VM at that is 2 GiB and could use 4 THPs. It's
> stupid, but there might be some selected use cases where it's not completely
> stupid.

I guess we limit the stupidity by MADV_COLLAPSE working on a PMD-aligned range
so it'll be a no-op for an attempt to collapse 2 MiB (unless I'm misreading the
code).

But it is a bit weird to think that users might assume they will get some
benefit in collapsing a range and in this case would not.

Anyway 64 KiB page sizes throws up a lot worse issues than this (e.g., page
blocks + water marks) so this is tip of the iceberg for that.

>
> --
> Cheers,
>
> David / dhildenb
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ