Messages in this thread | ![/](/images/icornerl.gif) | | Date | Wed, 3 Sep 2003 19:43:08 +0100 (BST) | From | Hugh Dickins <> | Subject | Re: [PATCH] Alternate futex non-page-pinning and COW fix |
| |
On Wed, 3 Sep 2003, Linus Torvalds wrote: > > If the patches can't be made to work for private mappings, then there's > something fundamentally wrong with them.
Of course (not). That's the point, they do work on private mappings, but the semantics are different on private mappings from on shared mappings: on private mappings they're private to the mm, on shared mappings they're shared with other mms (via the shared file).
> So the thing boils down to: > > - if the futex works on a proper private mapping, then the downgrade is > still proper, and the futex should never care about anything but a real > VM_SHARED.
In the usual mm case, yes, deciding by VM_SHARED and ignoring VM_MAYSHARE turns out to be the right thing to do.
But a futex differs from the usual mm case, that much was clear when they were invented, but we're still discovering just how they are.
As I've said before, I haven't a clue about the user/glibc end of futexes, and for all I know a futex on a shared-readonly-cannot-be- mprotected-for-writing mapping cannot be used as a futex. If that's so, then perhaps we should simply prohibit sys_futex on such an area, and settle this dispute in that way. Is that the case?
Hugh
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |