linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@google.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux API <linux-api@vger.kernel.org>
Subject: Re: [PATCH V3] mm: Allow userland to request that the kernel clear memory on release
Date: Fri, 26 Apr 2019 11:10:22 -0700	[thread overview]
Message-ID: <CACdnJuuVBb8bOUGGq0H+Ask_ufT3X9YH42o5nAGQK0TCf+aKWg@mail.gmail.com> (raw)
In-Reply-To: <d058d1ef-994f-ea6b-b6b4-bcd838a9fe2f@suse.cz>

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.

      reply	other threads:[~2019-04-26 18:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CACdnJuup-y1xAO93wr+nr6ARacxJ9YXgaceQK9TLktE7shab1w@mail.gmail.com>
     [not found] ` <20190424211038.204001-1-matthewgarrett@google.com>
2019-04-25 12:14   ` [PATCH V2] mm: Allow userland to request that the kernel clear memory on release Michal Hocko
2019-04-25 12:37     ` Michal Hocko
2019-04-25 20:39       ` Matthew Garrett
2019-04-26  5:25         ` Michal Hocko
2019-04-26 18:08           ` Matthew Garrett
2019-04-29 21:44             ` Michal Hocko
2019-04-25 12:40     ` Vlastimil Babka
2019-04-25 20:45       ` Matthew Garrett
2019-04-25 12:42     ` Jann Horn
2019-04-25 20:43       ` Matthew Garrett
2019-04-26  5:31       ` Michal Hocko
2019-04-26 13:33         ` Jann Horn
2019-04-26 13:47           ` Michal Hocko
2019-04-26 14:03             ` Jann Horn
2019-04-26 14:08               ` Michal Hocko
2019-04-25 22:58 ` [PATCH V3] " Matthew Garrett
2019-04-26  7:45   ` Vlastimil Babka
2019-04-26 18:10     ` Matthew Garrett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACdnJuuVBb8bOUGGq0H+Ask_ufT3X9YH42o5nAGQK0TCf+aKWg@mail.gmail.com \
    --to=mjg59@google.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).