From: Andrew Jones <drjones@redhat.com>
To: Andrea Arcangeli <aarcange@redhat.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Juan Quintela <quintela@redhat.com>,
Hugh Dickins <hughd@google.com>,
qemu-devel@nongnu.org, linux-kernel@vger.kernel.org,
Orit Wasserman <owasserm@redhat.com>,
Mel Gorman <mgorman@suse.de>, Paolo Bonzini <pbonzini@redhat.com>,
Isaku Yamahata <yamahata@valinux.co.jp>
Subject: Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages()
Date: Tue, 7 May 2013 13:38:10 +0200 [thread overview]
Message-ID: <20130507113809.GB10720@hawk.usersys.redhat.com> (raw)
In-Reply-To: <1367870221-12676-1-git-send-email-aarcange@redhat.com>
On Mon, May 06, 2013 at 09:56:57PM +0200, Andrea Arcangeli wrote:
>
> The current behavior of remap_anon_pages is very strict to avoid any
> chance of memory corruption going unnoticed, and it will return
> -EFAULT at the first sign of something unexpected (like a page already
> mapped in the destination pmd/pte, potentially signaling an userland
> thread race condition with two threads userfaulting on the same
> destination address). mremap is not strict like that: it would drop
> the destination range silently and it would succeed in such a
> condition. So on the API side, I wonder if I should add a flag to
> remap_anon_pages to provide non-strict behavior more similar to
> mremap. OTOH not providing the permissive mremap behavior may actually
> be better to force userland to be strict and be sure it knows what it
> is doing (otherwise it should use mremap in the first place?).
>
What about instead of adding a new syscall (remap_anon_pages) to
instead extend mremap with new flags giving it a strict mode?
drew
next prev parent reply other threads:[~2013-05-07 11:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-06 19:56 [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages() Andrea Arcangeli
2013-05-06 19:56 ` [Qemu-devel] [PATCH 1/4] mm: madvise MADV_USERFAULT Andrea Arcangeli
2013-05-07 11:16 ` Andrew Jones
2013-05-07 11:34 ` Andrea Arcangeli
2013-05-06 19:56 ` [Qemu-devel] [PATCH 2/4] mm: rmap preparation for remap_anon_pages Andrea Arcangeli
2013-05-06 19:57 ` [Qemu-devel] [PATCH 3/4] mm: swp_entry_swapcount Andrea Arcangeli
2013-05-06 19:57 ` [Qemu-devel] [PATCH 4/4] mm: sys_remap_anon_pages Andrea Arcangeli
2013-05-06 20:01 ` Andrea Arcangeli
2013-05-07 10:07 ` [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages() Isaku Yamahata
2013-05-07 12:09 ` Andrea Arcangeli
2013-05-07 11:38 ` Andrew Jones [this message]
2013-05-07 12:19 ` Andrea Arcangeli
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=20130507113809.GB10720@hawk.usersys.redhat.com \
--to=drjones@redhat.com \
--cc=aarcange@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=owasserm@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=yamahata@valinux.co.jp \
/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).