lkml.org 
[lkml]   [2019]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    Date
    SubjectRe: [PATCH V3] mm: Allow userland to request that the kernel clear memory on release
    On Fri, Apr 26, 2019 at 12:45 AM Vlastimil Babka <vbabka@suse.cz> wrote:
    >
    > On 4/26/19 12:58 AM, Matthew Garrett wrote:
    > > Updated based on feedback from Jann - for now let's just prevent setting
    > > the flag on anything that has already mapped some pages, which avoids
    > > child processes being able to interfere with the parent. In addition,
    >
    > That makes the API quite tricky and different from existing madvise()
    > modes that don't care. One would for example have to call
    > madvise(MADV_WIPEONRELEASE) before mlock(), otherwise mlock() would
    > fault the pages in (unless MLOCK_ONFAULT). As such it really looks like
    > a mmap() flag, but that's less flexible.
    >
    > How bout just doing the CoW on any such pre-existing pages as part of
    > the madvise(MADV_WIPEONRELEASE) call?

    I'll look into the easiest way to do that.

    \
     
     \ /
      Last update: 2019-04-26 20:11    [W:3.366 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site