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: <a16071e5-ae97-4e1a-9df8-f353f6b319c7@lucifer.local>
Date: Wed, 25 Jun 2025 09:12:14 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: David Hildenbrand <david@...hat.com>
Cc: Hugh Dickins <hughd@...gle.com>,
        Baolin Wang <baolin.wang@...ux.alibaba.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 08:55:28AM +0100, Lorenzo Stoakes wrote:
> I suppose the least awful way of addressing Baolin's concerns re: mTHP
> while simultaneosly keeping existing semantics is:
>
> 1. Introduce deny to mean what never should have meant.

To fix Baolin's issue btw we'd have to add 'deny' to both 'global' settings
_and_ each page size setting.

Because otherwise we'd end up in a weird case where say:

global 'deny'

 2 MiB 'never'
64 KiB 'inherit'

And err... get 2 MiB THP pages from MADV_COLLAPSE :)

Or:

global 'deny'

 2 MiB 'never'
64 KiB 'always'

Or:

global 'never'

 2 MiB 'never'
64 KiB 'always'

Or:

global 'never'

 2 MiB 'madvise'
64 KiB 'always'

All doing the same. Not very clear is it?

We have sowed the seeds of something terrible here, truly.

Even with this change we'd end up with:

global 'always'

  2 MiB 'deny'
256 KiB 'never'
 64 KiB 'never'

Means 256 KiB...

I wonder whether doing this just adds even more of a mess?

> 2. Use something like the logic here to enforce it.
> 3. Heavily document it (I can do this).
>
> But I still find this yucky based on the fact that nobody will expect any
> of this.
>
> But maybe the THP toggles are such a mess that we're past that anyway?...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ