Re: [discuss] [PATCH] Inconsistent mmap()/mremap() flags

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andi Kleen <ak@...>
Cc: <discuss@...>, Thayne Harbaugh <thayne@...>, <linux-mm@...>, <linux-kernel@...>
Date: Tuesday, October 2, 2007 - 10:16 am

On Tue, 2 Oct 2007, Andi Kleen wrote:

Perhaps.  Though I don't see what your loop would be doing;
and the mapping established by the first thread would only
be vulnerable to another thread if that were really set on
interfering (an un-FIXED mmap by another thread will keep
away from the area assigned to the first).

Certainly a two-stage procedure has to be weaker than one stage,
but it is just how MAP_FIXED is normally used (isn't it?): first
stake out an arena for all that's needed without MAP_FIXED, then
fit into it the actual mappings required using MAP_FIXED.  Blind
use of MAP_FIXED is always in danger of unmapping something vital.

But whether the two-stage procedure is good enough for Thayne's
purpose, he'll have to judge for himself.

Hugh
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Inconsistent mmap()/mremap() flags, Thayne Harbaugh, (Fri Sep 28, 1:46 am)
Re: [PATCH] Inconsistent mmap()/mremap() flags, Andi Kleen, (Mon Oct 1, 7:13 am)
Re: [PATCH] Inconsistent mmap()/mremap() flags, Thayne Harbaugh, (Mon Oct 1, 10:57 pm)
Re: [PATCH] Inconsistent mmap()/mremap() flags, Andi Kleen, (Tue Oct 2, 1:15 am)
Re: [PATCH] Inconsistent mmap()/mremap() flags, Thayne Harbaugh, (Tue Oct 2, 3:06 am)
Re: [PATCH] Inconsistent mmap()/mremap() flags, Hugh Dickins, (Tue Oct 2, 8:19 am)
Re: [discuss] [PATCH] Inconsistent mmap()/mremap() flags, Hugh Dickins, (Tue Oct 2, 10:16 am)
Re: [discuss] [PATCH] Inconsistent mmap()/mremap() flags, Thayne Harbaugh, (Tue Oct 2, 11:21 am)