[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pa
From: |
Andrew Jones |
Subject: |
Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages() |
Date: |
Tue, 7 May 2013 13:38:10 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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
- [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages(), Andrea Arcangeli, 2013/05/06
- [Qemu-devel] [PATCH 3/4] mm: swp_entry_swapcount, Andrea Arcangeli, 2013/05/06
- [Qemu-devel] [PATCH 2/4] mm: rmap preparation for remap_anon_pages, Andrea Arcangeli, 2013/05/06
- [Qemu-devel] [PATCH 1/4] mm: madvise MADV_USERFAULT, Andrea Arcangeli, 2013/05/06
- [Qemu-devel] [PATCH 4/4] mm: sys_remap_anon_pages, Andrea Arcangeli, 2013/05/06
- Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages(), Isaku Yamahata, 2013/05/07
- Re: [Qemu-devel] [PATCH 0/4] madvise(MADV_USERFAULT) & sys_remap_anon_pages(),
Andrew Jones <=