search for: vmci_datagram_dispatch

Displaying 16 results from an estimated 16 matches for "vmci_datagram_dispatch".

2015 Feb 15
1
vmci: read overrun bug in dg_dispatch_as_host() (drivers/misc/vmw_vmci/vmci_datagram.c)
...m 2014), but the impact is probably minimal since this interface is only used for local communication. The bug occurs for the IOCTL_VMCI_DATAGRAM_SEND ioctl, and our tool reports the following partial backtrace: #0 memcpy () #1 dg_dispatch_as_host () at drivers/misc/vmw_vmci/vmci_datagram.c:245 #2 vmci_datagram_dispatch () at drivers/misc/vmw_vmci/vmci_datagram.c:347 #3 vmci_host_do_send_datagram () at drivers/misc/vmw_vmci/vmci_host.c:404 Here?s the relevant code snippet from dg_dispatch_as_host(): 171: dg_size = VMCI_DG_SIZE(dg); ... 235: dg_info = kmalloc(sizeof(*dg_info) + 236: (size_t) dg->...
2015 Feb 15
1
vmci: read overrun bug in dg_dispatch_as_host() (drivers/misc/vmw_vmci/vmci_datagram.c)
...m 2014), but the impact is probably minimal since this interface is only used for local communication. The bug occurs for the IOCTL_VMCI_DATAGRAM_SEND ioctl, and our tool reports the following partial backtrace: #0 memcpy () #1 dg_dispatch_as_host () at drivers/misc/vmw_vmci/vmci_datagram.c:245 #2 vmci_datagram_dispatch () at drivers/misc/vmw_vmci/vmci_datagram.c:347 #3 vmci_host_do_send_datagram () at drivers/misc/vmw_vmci/vmci_host.c:404 Here?s the relevant code snippet from dg_dispatch_as_host(): 171: dg_size = VMCI_DG_SIZE(dg); ... 235: dg_info = kmalloc(sizeof(*dg_info) + 236: (size_t) dg->...
2012 Aug 30
0
[PATCH 02/11] vmci_datagram.patch: VMCI datagram entity handling.
...+ + retval = vmci_send_datagram(dg); + vmci_resource_release(resource); + return retval; +} + +/* + * Dispatch datagram. This will determine the routing for the datagram + * and dispatch it accordingly. + * Returns number of bytes sent on success, error code otherwise. + */ +int vmci_datagram_dispatch(u32 contextID, + struct vmci_datagram *dg, bool fromGuest) +{ + int retval; + enum vmci_route route; + + ASSERT(dg); + BUILD_BUG_ON(sizeof(struct vmci_datagram) != 24); + + if (VMCI_DG_SIZE(dg) > VMCI_MAX_DG_SIZE) { + pr_devel("...
2012 Aug 30
0
[PATCH 02/11] vmci_datagram.patch: VMCI datagram entity handling.
...+ + retval = vmci_send_datagram(dg); + vmci_resource_release(resource); + return retval; +} + +/* + * Dispatch datagram. This will determine the routing for the datagram + * and dispatch it accordingly. + * Returns number of bytes sent on success, error code otherwise. + */ +int vmci_datagram_dispatch(u32 contextID, + struct vmci_datagram *dg, bool fromGuest) +{ + int retval; + enum vmci_route route; + + ASSERT(dg); + BUILD_BUG_ON(sizeof(struct vmci_datagram) != 24); + + if (VMCI_DG_SIZE(dg) > VMCI_MAX_DG_SIZE) { + pr_devel("...
2013 Jan 08
13
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware to address Greg's and all other's code review comments. Summary of changes: - Rebase our linux kernel tree from v3.5 to v3.7. - Fix all checkpatch warnings and errors. Fix some checkpatch with -strict errors. This addresses Greg's comment: On 15 Nov 2012
2013 Jan 08
13
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware to address Greg's and all other's code review comments. Summary of changes: - Rebase our linux kernel tree from v3.5 to v3.7. - Fix all checkpatch warnings and errors. Fix some checkpatch with -strict errors. This addresses Greg's comment: On 15 Nov 2012
2012 Aug 30
2
[PATCH 01/11] vmci_context.patch: VMCI context list operations.
...sizeof(*eMsg) + sizeof(*evPayload) - sizeof(eMsg->hdr); + eMsg->eventData.event = VMCI_EVENT_CTX_REMOVED; + evPayload = vmci_event_data_payload(&eMsg->eventData); + evPayload->contextID = contextID; + + result = vmci_datagram_dispatch(VMCI_HYPERVISOR_CONTEXT_ID, + (struct vmci_datagram *) + eMsg, false); + if (result < VMCI_SUCCESS) { + pr_devel("Failed to enqueue event datagram " \ +...
2012 Aug 30
2
[PATCH 01/11] vmci_context.patch: VMCI context list operations.
...sizeof(*eMsg) + sizeof(*evPayload) - sizeof(eMsg->hdr); + eMsg->eventData.event = VMCI_EVENT_CTX_REMOVED; + evPayload = vmci_event_data_payload(&eMsg->eventData); + evPayload->contextID = contextID; + + result = vmci_datagram_dispatch(VMCI_HYPERVISOR_CONTEXT_ID, + (struct vmci_datagram *) + eMsg, false); + if (result < VMCI_SUCCESS) { + pr_devel("Failed to enqueue event datagram " \ +...
2012 Oct 16
11
[PATCH 00/10] VMCI for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later
2012 Oct 16
11
[PATCH 00/10] VMCI for Linux upstreaming
* * * In an effort to improve the out-of-the-box experience with Linux kernels for VMware users, VMware is working on readying the Virtual Machine Communication Interface (vmw_vmci) and VMCI Sockets (vmw_vsock) kernel modules for inclusion in the Linux kernel. The purpose of this post is to acquire feedback on the vmw_vmci kernel module. The vmw_vsock kernel module will be presented in a later
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
...(unsigned long long) dg->payloadSize); + + /* Get source context id. */ + ASSERT(vmciLinux->context); + cid = vmci_ctx_get_id(vmciLinux->context); + ASSERT(cid != VMCI_INVALID_ID); + sendInfo.result = vmci_datagram_dispatch(cid, dg, true); + kfree(dg); + retval = + copy_to_user((void *)ioarg, &sendInfo, + sizeof(sendInfo)); + break; + } + + case IOCTL_VMCI_DATAGRAM_RECEIVE:{ + struct vmci_da...
2012 Aug 30
1
[PATCH 04/11] vmci_driver.patch: VMCI device driver.
...(unsigned long long) dg->payloadSize); + + /* Get source context id. */ + ASSERT(vmciLinux->context); + cid = vmci_ctx_get_id(vmciLinux->context); + ASSERT(cid != VMCI_INVALID_ID); + sendInfo.result = vmci_datagram_dispatch(cid, dg, true); + kfree(dg); + retval = + copy_to_user((void *)ioarg, &sendInfo, + sizeof(sendInfo)); + break; + } + + case IOCTL_VMCI_DATAGRAM_RECEIVE:{ + struct vmci_da...
2012 Oct 30
29
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware. -split guest, host and core driver code into different files -use EXPORT_SYMBOLS_GPL -remove vmci_device_get and vmci_device_release APIs -simplify the event deliver mechanism -driver ioctl code cleanup -sparse clean * * * In an effort to improve the out-of-the-box experience with
2012 Oct 30
29
[PATCH 00/12] VMCI for Linux upstreaming
* * * This series of VMCI linux upstreaming patches include latest udpate from VMware. -split guest, host and core driver code into different files -use EXPORT_SYMBOLS_GPL -remove vmci_device_get and vmci_device_release APIs -simplify the event deliver mechanism -driver ioctl code cleanup -sparse clean * * * In an effort to improve the out-of-the-box experience with
2012 Aug 30
0
[PATCH 08/11] vmci_queue_pair.patch: VMCI queue pair implementation.
...sizeof(eMsg->hdr); + eMsg->eventData.event = attach ? + VMCI_EVENT_QP_PEER_ATTACH : VMCI_EVENT_QP_PEER_DETACH; + evPayload = vmci_event_data_payload(&eMsg->eventData); + evPayload->handle = handle; + evPayload->peerId = myId; + + rv = vmci_datagram_dispatch(VMCI_HYPERVISOR_CONTEXT_ID, + (struct vmci_datagram *)eMsg, false); + if (rv < VMCI_SUCCESS) + pr_warn("Failed to enqueue QueuePair %s event datagram " \ + "for context (ID=0x%x).", attach ? "ATTACH&qu...
2012 Aug 30
0
[PATCH 08/11] vmci_queue_pair.patch: VMCI queue pair implementation.
...sizeof(eMsg->hdr); + eMsg->eventData.event = attach ? + VMCI_EVENT_QP_PEER_ATTACH : VMCI_EVENT_QP_PEER_DETACH; + evPayload = vmci_event_data_payload(&eMsg->eventData); + evPayload->handle = handle; + evPayload->peerId = myId; + + rv = vmci_datagram_dispatch(VMCI_HYPERVISOR_CONTEXT_ID, + (struct vmci_datagram *)eMsg, false); + if (rv < VMCI_SUCCESS) + pr_warn("Failed to enqueue QueuePair %s event datagram " \ + "for context (ID=0x%x).", attach ? "ATTACH&qu...