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

Roland Dreier rolandd at cisco.com
Tue Jul 5 15:07:28 PDT 2005


    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.



More information about the general mailing list