Re: [PATCH 11/16] IB uverbs: add mthca mmap support

From: Roland Dreier
Date: Tue Jul 05 2005 - 17:18:13 EST


Michael> Roland, I think VM_DONTCOPY is needed here.

Michael> If a process forks, we must prevent the child from
Michael> accessing the parent's hardware page. Otherwise the child
Michael> can corrupt the parent's queues since the hardware wont
Michael> be able to distinguish between parent and child.

Michael> Does this make sense?

This is true, but there are a number of pieces that are required
before fork will work for processes using userspace verbs. One of the
ingredients that's missing is adding something like PROT_DONTCOPY for
mprotect(). Once that's in place, an app can use that on the
doorbell page before forking.

I don't consider this attack by children of a process very serious,
since a process can always fork, munmap the doorbell page in the child
process, and then fork the untrusted child into yet another child.

- R.
-
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/