search for: avail_mapped

Displaying 4 results from an estimated 4 matches for "avail_mapped".

2014 Aug 10
0
[PATCH] vhost: Add polling mode
...vq->avail to the kernel's memory space. */ > + if (get_user_pages_fast((unsigned long)vq->avail, 1, 0, > + &vq->vqpoll.avail_page) != 1) { > + /* TODO: can this happen, as we check access > + to vq->avail in advance? */ > + BUG(); > + } > + vq->vqpoll.avail_mapped = (struct vring_avail *) ( > + (unsigned long)kmap(vq->vqpoll.avail_page) | > + ((unsigned long)vq->avail & ~PAGE_MASK)); > +} > + > +/* > + * This function doesn't always succeed in changing the mode. Sometimes > + * a temporary race condition prevents turning...
2014 Aug 20
0
[PATCH] vhost: Add polling mode
...vq->avail in advance? */ It can since you don't have the mm lock, so userspace can unmap the page in this window. And especially since you didn't check __get_user return code, so you don't even know that it succeeded in the first place. > + BUG(); > + } > + vq->vqpoll.avail_mapped = (struct vring_avail *) ( > + (unsigned long)kmap(vq->vqpoll.avail_page) | > + ((unsigned long)vq->avail & ~PAGE_MASK)); > +} > + > +/* > + * This function doesn't always succeed in changing the mode. Sometimes > + * a temporary race condition prevents turning...
2014 Aug 10
7
[PATCH] vhost: Add polling mode
...= true; + + /* Map userspace's vq->avail to the kernel's memory space. */ + if (get_user_pages_fast((unsigned long)vq->avail, 1, 0, + &vq->vqpoll.avail_page) != 1) { + /* TODO: can this happen, as we check access + to vq->avail in advance? */ + BUG(); + } + vq->vqpoll.avail_mapped = (struct vring_avail *) ( + (unsigned long)kmap(vq->vqpoll.avail_page) | + ((unsigned long)vq->avail & ~PAGE_MASK)); +} + +/* + * This function doesn't always succeed in changing the mode. Sometimes + * a temporary race condition prevents turning on guest notifications, so + * vq s...
2014 Aug 10
7
[PATCH] vhost: Add polling mode
...= true; + + /* Map userspace's vq->avail to the kernel's memory space. */ + if (get_user_pages_fast((unsigned long)vq->avail, 1, 0, + &vq->vqpoll.avail_page) != 1) { + /* TODO: can this happen, as we check access + to vq->avail in advance? */ + BUG(); + } + vq->vqpoll.avail_mapped = (struct vring_avail *) ( + (unsigned long)kmap(vq->vqpoll.avail_page) | + ((unsigned long)vq->avail & ~PAGE_MASK)); +} + +/* + * This function doesn't always succeed in changing the mode. Sometimes + * a temporary race condition prevents turning on guest notifications, so + * vq s...