search for: __get_user_mm

Displaying 5 results from an estimated 5 matches for "__get_user_mm".

2016 Jun 17
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...om victim which shares mm with the vhost kernel thread because it could see a zero page unexpectedly and theoretically make an incorrect decision visible outside of the killed task context. Make sure that each place which can read from userspace is annotated properly and it uses copy_from_user_mm, __get_user_mm resp. copy_from_iter_mm. Each will get the target mm as an argument and it performs a pessimistic check to rule out that the oom_reaper could possibly unmap the particular page. __oom_reap_task then just needs to mark the mm as unstable before it unmaps any page. This is a preparatory patch withou...
2016 Jun 17
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...om victim which shares mm with the vhost kernel thread because it could see a zero page unexpectedly and theoretically make an incorrect decision visible outside of the killed task context. Make sure that each place which can read from userspace is annotated properly and it uses copy_from_user_mm, __get_user_mm resp. copy_from_iter_mm. Each will get the target mm as an argument and it performs a pessimistic check to rule out that the oom_reaper could possibly unmap the particular page. __oom_reap_task then just needs to mark the mm as unstable before it unmaps any page. This is a preparatory patch withou...
2016 Jun 18
0
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...with the vhost kernel thread because it could see a zero > page unexpectedly and theoretically make an incorrect decision visible > outside of the killed task context. > > Make sure that each place which can read from userspace is annotated > properly and it uses copy_from_user_mm, __get_user_mm resp. > copy_from_iter_mm. Each will get the target mm as an argument and it > performs a pessimistic check to rule out that the oom_reaper could > possibly unmap the particular page. __oom_reap_task then just needs to > mark the mm as unstable before it unmaps any page. > > This...
2016 Jun 19
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...able_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > /* They could have slipped one in as we were doing that: make > > * sure it's written, then check again. */ > > smp_mb(); > > - r = __get_user(avail_idx, &vq->avail->idx); > > + r = __get_user_mm(dev->mm,avail_idx, &vq->avail->idx); > > space after , pls sure > > > if (r) { > > vq_err(vq, "Failed to check avail idx at %p: %d\n", > > &vq->avail->idx, r); > > diff --git a/include/linux/sched.h b/include/linux...
2016 Jun 19
2
[RFC PATCH] vhost, mm: make sure that oom_reaper doesn't reap memory read by vhost
...able_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq) > > /* They could have slipped one in as we were doing that: make > > * sure it's written, then check again. */ > > smp_mb(); > > - r = __get_user(avail_idx, &vq->avail->idx); > > + r = __get_user_mm(dev->mm,avail_idx, &vq->avail->idx); > > space after , pls sure > > > if (r) { > > vq_err(vq, "Failed to check avail idx at %p: %d\n", > > &vq->avail->idx, r); > > diff --git a/include/linux/sched.h b/include/linux...