Commit Graph
4 Commits
Author SHA1 Message Date
Jorgen Hansen a1d88436d5 VMCI: Fix two UVA mapping bugs
(this is a resend of this patch. Originally sent last year, but post
 appears to have been lost)

This change fixes two bugs in the VMCI host driver related to mapping
the notify boolean from user space into kernel space:
- the actual UVA was rounded up to the next page boundary - resulting
  in memory corruption in the calling process whenever notifications
  would be signalled. This has been fixed by just removing the
  PAGE_ALIGN part, since get_user_pages_fast can figure this out on
  its own
- the mapped page wasn't stored anywhere, so it wasn't unmapped and
  put back when a VMCI context was destroyed. Fixed this by
  remembering the page.

Acked-by: Andy King <[email protected]>
Acked-by: Darius Davis <[email protected]>
Signed-off-by: Jorgen Hansen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2015-01-25 09:18:00 -08:00
Jan Kara 240ddd495a vmw_vmci: Convert driver to use get_user_pages_fast()
Convert vmci_host_setup_notify() and qp_host_get_user_memory() to use
get_user_pages_fast() instead of get_user_pages(). Note that
qp_host_get_user_memory() was using mmap_sem for writing without an
apparent reason.

CC: Arnd Bergmann <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-10-05 18:04:55 -07:00
Dmitry Torokhov ea8a83a4b7 VMCI: include slab.h into files using kmalloc/kfree
Do not rely on implicit header dependencies as they are known to
break.

Reported-by: Randy Dunlap <[email protected]>
Acked-by: Andy King <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-17 12:07:39 -08:00
George Zhang 8bf503991f VMCI: host side driver implementation.
VMCI host side driver code implementation.

Signed-off-by: George Zhang <[email protected]>
Acked-by: Andy king <[email protected]>
Acked-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-01-08 16:15:56 -08:00