All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rik van Riel <riel@redhat.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	fweimer@redhat.com, colm@allcosts.net, akpm@linux-foundation.org,
	rppt@linux.vnet.ibm.com, keescook@chromium.org,
	luto@amacapital.net, wad@chromium.org, mingo@kernel.org
Subject: Re: [PATCH 0/2] mm,fork,security: introduce MADV_WIPEONFORK
Date: Sat, 05 Aug 2017 11:21:44 -0400	[thread overview]
Message-ID: <1501946504.6577.9.camel@redhat.com> (raw)
In-Reply-To: <20170804234435.lkblljl3f3ud2spm@node.shutemov.name>

On Sat, 2017-08-05 at 02:44 +0300, Kirill A. Shutemov wrote:
> On Fri, Aug 04, 2017 at 03:07:28PM -0400, riel@redhat.com wrote:
> > [resend because half the recipients got dropped due to IPv6
> > firewall issues]
> > 
> > Introduce MADV_WIPEONFORK semantics, which result in a VMA being
> > empty in the child process after fork. This differs from
> > MADV_DONTFORK
> > in one important way.
> > 
> > If a child process accesses memory that was MADV_WIPEONFORK, it
> > will get zeroes. The address ranges are still valid, they are just
> > empty.
> 
> I feel like we are repeating mistake we made with MADV_DONTNEED.
> 
> MADV_WIPEONFORK would require a specific action from kernel, ignoring
> the /advise/ would likely lead to application misbehaviour.
> 
> Is it something we really want to see from madvise()?

We already have various mandatory madvise behaviors in Linux,
including MADV_REMOVE, MADV_DONTFORK, and MADV_DONTDUMP.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

WARNING: multiple messages have this Message-ID (diff)
From: Rik van Riel <riel@redhat.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	fweimer@redhat.com, colm@allcosts.net, akpm@linux-foundation.org,
	rppt@linux.vnet.ibm.com, keescook@chromium.org,
	luto@amacapital.net, wad@chromium.org, mingo@kernel.org
Subject: Re: [PATCH 0/2] mm,fork,security: introduce MADV_WIPEONFORK
Date: Sat, 05 Aug 2017 11:21:44 -0400	[thread overview]
Message-ID: <1501946504.6577.9.camel@redhat.com> (raw)
In-Reply-To: <20170804234435.lkblljl3f3ud2spm@node.shutemov.name>

On Sat, 2017-08-05 at 02:44 +0300, Kirill A. Shutemov wrote:
> On Fri, Aug 04, 2017 at 03:07:28PM -0400, riel@redhat.com wrote:
> > [resend because half the recipients got dropped due to IPv6
> > firewall issues]
> > 
> > Introduce MADV_WIPEONFORK semantics, which result in a VMA being
> > empty in the child process after fork. This differs from
> > MADV_DONTFORK
> > in one important way.
> > 
> > If a child process accesses memory that was MADV_WIPEONFORK, it
> > will get zeroes. The address ranges are still valid, they are just
> > empty.
> 
> I feel like we are repeating mistake we made with MADV_DONTNEED.
> 
> MADV_WIPEONFORK would require a specific action from kernel, ignoring
> the /advise/ would likely lead to application misbehaviour.
> 
> Is it something we really want to see from madvise()?

We already have various mandatory madvise behaviors in Linux,
including MADV_REMOVE, MADV_DONTFORK, and MADV_DONTDUMP.

  reply	other threads:[~2017-08-05 15:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-04 19:07 [PATCH 0/2] mm,fork,security: introduce MADV_WIPEONFORK riel
2017-08-04 19:07 ` riel
2017-08-04 19:07 ` [PATCH 1/2] x86,mpx: make mpx depend on x86-64 to free up VMA flag riel
2017-08-04 19:07   ` riel
2017-08-04 19:25   ` Dave Hansen
2017-08-04 19:25     ` Dave Hansen
2017-08-04 19:07 ` [PATCH 2/2] mm,fork: introduce MADV_WIPEONFORK riel
2017-08-04 19:07   ` riel
2017-08-04 23:09   ` Mike Kravetz
2017-08-04 23:09     ` Mike Kravetz
2017-08-05 14:05     ` Rik van Riel
2017-08-05 14:05       ` Rik van Riel
2017-08-14 15:45   ` kbuild test robot
2017-08-04 23:44 ` [PATCH 0/2] mm,fork,security: " Kirill A. Shutemov
2017-08-04 23:44   ` Kirill A. Shutemov
2017-08-05 15:21   ` Rik van Riel [this message]
2017-08-05 15:21     ` Rik van Riel

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=1501946504.6577.9.camel@redhat.com \
    --to=riel@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=colm@allcosts.net \
    --cc=fweimer@redhat.com \
    --cc=keescook@chromium.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=luto@amacapital.net \
    --cc=mingo@kernel.org \
    --cc=rppt@linux.vnet.ibm.com \
    --cc=wad@chromium.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.