| Age | Commit message (Collapse) | Author | Files | Lines |
|
iovcnt is declared as a signed integer in both the userspace API and
as a local variable in mic_virtio.c. The while() loop in mic_virtio.c
iterates until the local variable iovcnt reaches the value 0. If
userspace passes e.g. INT_MIN as iovcnt field, this loop then appears
to depend on an undefined behavior (signed underflow) to complete.
The fix is to use unsigned integers in both the userspace API and
the local variable.
This issue was reported @ https://lkml.org/lkml/2014/1/10/10
Reported-by: Mathieu Desnoyers <[email protected]>
Reviewed-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Sudeep Dutt <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The following warning from mic_ioctl.h is fixed via this patch:
found __[us]{8,16,32,64} type without #include <linux/types.h>
Reported-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Dasaratharaman Chandramouli <[email protected]>
Signed-off-by: Nikhil Rao <[email protected]>
Signed-off-by: Harshavardhan R Kharche <[email protected]>
Signed-off-by: Sudeep Dutt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch introduces the host "Virtio over PCIe" interface for
Intel MIC. It allows creating user space backends on the host and instantiating
virtio devices for them on the Intel MIC card. It uses the existing VRINGH
infrastructure in the kernel to access virtio rings from the host. A character
device per MIC is exposed with IOCTL, mmap and poll callbacks. This allows the
user space backend to:
(a) add/remove a virtio device via a device page.
(b) map (R/O) virtio rings and device page to user space.
(c) poll for availability of data.
(d) copy a descriptor or entire descriptor chain to/from the card.
(e) modify virtio configuration.
(f) handle virtio device reset.
The buffers are copied over using CPU copies for this initial patch
and host initiated MIC DMA support is planned for future patches.
The avail and desc virtio rings are in host memory and the used ring
is in card memory to maximize writes across PCIe for performance.
Co-author: Sudeep Dutt <[email protected]>
Signed-off-by: Ashutosh Dixit <[email protected]>
Signed-off-by: Caz Yokoyama <[email protected]>
Signed-off-by: Dasaratharaman Chandramouli <[email protected]>
Signed-off-by: Nikhil Rao <[email protected]>
Signed-off-by: Harshavardhan R Kharche <[email protected]>
Signed-off-by: Sudeep Dutt <[email protected]>
Acked-by: Yaozu (Eddie) Dong <[email protected]>
Reviewed-by: Peter P Waskiewicz Jr <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|