Messages in this thread | | | Date | Mon, 8 Sep 2003 10:44:13 +0100 | From | Jamie Lokier <> | Subject | Re: [PATCH] Alternate futex non-page-pinning and COW fix |
| |
Rusty Russell wrote: > In message <20030907132010.GB19977@mail.jlokier.co.uk> you write: > > I don't see a problem, as long as it is documented. Anybody grokking > > the old futex code would expect futexes to move with mappings. > > BTW, I don't know of anyone *doing* this, but IMHO it's not worth a > single line of kernel code, since if you don't adjust your futex > addresses when you mremap, the try_down_futex will segv after the poll > or whatever. As a programmer, I would *expect* to have to reset the > futexes (along with every other pointer into the map) when mremap > happens: after all, I told the kernel to watch the old address. If it > still works, great, but I'd not expect it.
Sure. As long as it's documented, because my expectation is the opposite of yours :)
(Some uses of futex don't read the memory after they are woken, until they have re-tested some other condition and can recalculate the address, so segv and pointers-into-the-map don't occur in these uses).
-- Jamie - 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/
| |