Re: [PATCH] Alternate futex non-page-pinning and COW fix

From: Linus Torvalds
Date: Thu Sep 04 2003 - 13:45:24 EST



On Thu, 4 Sep 2003, Linus Torvalds wrote:
>
> Oh. I see. Yes - it's accessing "vm_flags" with "MAP_SEM". That's really
> wrong, since it's not even the same _domain_.

How about something like this that at least gets it closer? It fixes the
fact that incorrect usage of PROT_SEM would allow users to set the
VM_SHARED bit behind the back of the OS, which sounds like a total
disaster and which can potentially confuse other parts of the VM.

It's not a very _pretty_ fix, but there really is no excuse for PROT_xxx
to not match VM_xxx for the three standard protection flags, so in that
sense it is the technically "sane" approach. We might want to just
simplify the mmap() code too..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/