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: <ZuMvCjS8G5ggz6Hy@casper.infradead.org>
Date: Thu, 12 Sep 2024 19:12:26 +0100
From: Matthew Wilcox <willy@...radead.org>
To: "Liam R. Howlett" <Liam.Howlett@...cle.com>,
	Helge Deller <deller@....de>, Yang Shi <shy828301@...il.com>,
	Helge Deller <deller@...nel.org>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-parisc@...r.kernel.org
Subject: Re: [PATCH] [RFC] mm: mmap: Allow mmap(MAP_STACK) to map growable
 stack

On Wed, Sep 11, 2024 at 09:32:29PM -0400, Liam R. Howlett wrote:
> * Helge Deller <deller@....de> [240911 20:51]:
> > On 9/12/24 01:05, Liam R. Howlett wrote:
> > > If someone is using MAP_STACK to avoid having a huge page, they will
> > > also get a mapping that grows - which is different than what happens
> > > today.
> > > 
> > > I'm not saying that's right, but someone could be abusing the existing
> > > flag and this will change the behaviour.
> > 
> > Wouldn't a plain mmap() followed by madvise(MADV_NOHUGEPAGE) do exactly that?
> > Why abusing MAP_STACK for that?
> 
> I can think of two answers:
> 1. An error that has worked without issues so far
> 2. One less system call
> 
> I'm not saying this really is a blocker, but the change is not without
> risk as it does change behaviour the user could see.
> 
> Interestingly enough, the man page is incorrect as it is written because
> the flag is not strictly a no-op; it ensures no huge pages.  So the
> feature of applying VM_NOHUGEPAGE with the use of MAP_STACK is not
> documented today.

It's a recent change and I don't think it's something we necessarily
want to document.  It was c4608d1bf7c6 which was December 2023.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ