[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170704155140.GC22013@1wt.eu>
Date: Tue, 4 Jul 2017 17:51:40 +0200
From: Willy Tarreau <w@....eu>
To: Ben Hutchings <ben@...adent.org.uk>
Cc: Michal Hocko <mhocko@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Hugh Dickins <hughd@...gle.com>,
Oleg Nesterov <oleg@...hat.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Rik van Riel <riel@...hat.com>,
Larry Woodman <lwoodman@...hat.com>,
"Kirill A. Shutemov" <kirill@...temov.name>,
Tony Luck <tony.luck@...el.com>,
"James E.J. Bottomley" <jejb@...isc-linux.org>,
Helge Diller <deller@....de>,
James Hogan <james.hogan@...tec.com>,
Laura Abbott <labbott@...hat.com>, Greg KH <greg@...ah.com>,
"security@...nel.org" <security@...nel.org>,
linux-distros@...openwall.org,
Qualys Security Advisory <qsa@...lys.com>,
LKML <linux-kernel@...r.kernel.org>,
Ximin Luo <infinity0@...ian.org>
Subject: Re: [PATCH] mm: larger stack guard gap, between vmas
On Tue, Jul 04, 2017 at 12:36:11PM +0100, Ben Hutchings wrote:
> > If anywhing this would require to have a loop over all PROT_NONE
> > mappings to not hit into other weird usecases.
>
> That's what I was thinking of. Tried the following patch:
(...)
> - next = vma->vm_next;
> + /*
> + * Allow VM_NONE mappings in the gap as some applications try
> + * to make their own stack guards
> + */
> + for (next = vma->vm_next;
> + next && !(next->vm_flags & (VM_READ | VM_WRITE | VM_EXEC));
> + next = next->vm_next)
> + ;
That's what I wanted to propose but I feared someone would scream at me
for this loop :-)
+1 for me!
Willy
Powered by blists - more mailing lists