lkml.org 
[lkml]   [2017]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 1/2] mm: introduce MAP_FIXED_SAFE
    From
    Date
    On 11/16/2017 11:18 AM, Michal Hocko wrote:
    > + if (flags & MAP_FIXED_SAFE) {
    > + struct vm_area_struct *vma = find_vma(mm, addr);
    > +
    > + if (vma && vma->vm_start <= addr)
    > + return -ENOMEM;
    > + }

    Could you pick a different error code which cannot also be caused by a
    an unrelated, possibly temporary condition? Maybe EBUSY or EEXIST?

    This would definitely help with application-based randomization of
    mappings, and there, actual ENOMEM and this error would have to be
    handled differently.

    Thanks,
    Florian
    \
     
     \ /
      Last update: 2017-11-17 17:18    [W:4.033 / U:0.540 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site