[openib-general] Re: [PATCH repost] PROT_DONTCOPY: ifiniband uverbs fork support
Michael S. Tsirkin
mst at mellanox.co.il
Wed Aug 10 01:30:07 PDT 2005
Quoting r. Hugh Dickins <hugh at veritas.com>:
> > > The other reason I dislike the patch is that the problem it fixes is
> > > an old one, and I'd much rather have get_user_pages fix it for itself,
> >
> > Please note that the problem this attempts to solve is not limited
> > to pages locked by get_user_pages: in an infiniband userspace initiator,
> > a hardware page is mapped into process memory and must not be inherited
> > by a child processes, otherwise hardware protection breaks.
>
> Interesting.
>
> But (correct me if I'm wrong, I know nothing about InfiniBand userspace
> initiators) that would be done by a driver, which can set VM_DONTCOPY
> on the vma, without us having to extend the mprotect or madvise API
Roland, Hugh here proposes setting VM_DONTCOPY on user-mapped PIO
memory from driver on mmap, to protect against child process
corrupting parent's user access region.
IIRC, we used to set this bit, but it was removed later - could you please
clarify why? Do you think its a good idea to restore this behaviour?
--
MST
More information about the general
mailing list