lkml.org 
[lkml]   [2017]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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

    \
     
     \ /
      Last update: 2017-07-04 17:52    [W:4.359 / U:0.072 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site