Re: Security hole in vhost-vdpa?

2021-06-09 Thread Jason Wang
在 2021/6/10 下午12:30, Michael S. Tsirkin 写道: On Mon, Jun 07, 2021 at 10:10:03AM +0800, Jason Wang wrote: 在 2021/6/7 上午5:38, Michael S. Tsirkin 写道: On Sun, Jun 06, 2021 at 02:39:48PM +, Gautam Dawar wrote: Hi All, This is in continuation to my findings noted in Bug 213179 and discussions

Re: Security hole in vhost-vdpa?

2021-06-09 Thread Michael S. Tsirkin
On Mon, Jun 07, 2021 at 10:10:03AM +0800, Jason Wang wrote: > > 在 2021/6/7 上午5:38, Michael S. Tsirkin 写道: > > On Sun, Jun 06, 2021 at 02:39:48PM +, Gautam Dawar wrote: > > > Hi All, > > > > > > > > > This is in continuation to my findings noted in Bug 213179 and > > > discussions we > > >

Re: [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support

2021-06-09 Thread Jason Wang
在 2021/6/10 上午11:43, Jiang Wang . 写道: On Wed, Jun 9, 2021 at 6:51 PM Jason Wang wrote: 在 2021/6/10 上午7:24, Jiang Wang 写道: This patchset implements support of SOCK_DGRAM for virtio transport. Datagram sockets are connectionless and unreliable. To avoid unfair contention with stream and

Re: Re: [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support

2021-06-09 Thread Jiang Wang .
On Wed, Jun 9, 2021 at 6:51 PM Jason Wang wrote: > > > 在 2021/6/10 上午7:24, Jiang Wang 写道: > > This patchset implements support of SOCK_DGRAM for virtio > > transport. > > > > Datagram sockets are connectionless and unreliable. To avoid unfair > > contention > > with stream and other sockets, add

Re: [External] Re: [RFC v4] virtio-vsock: add description for datagram type

2021-06-09 Thread Jiang Wang .
On Wed, Jun 9, 2021 at 12:17 AM Stefano Garzarella wrote: > > On Tue, Jun 08, 2021 at 09:22:26PM -0700, Jiang Wang . wrote: > >On Tue, Jun 8, 2021 at 6:46 AM Stefano Garzarella > >wrote: > >> > >> On Fri, May 28, 2021 at 04:01:18AM +, Jiang Wang wrote: > >> >From: "jiang.wang" > >> > > >>

Re: [PATCH 0/7] Do not read from descriptor ring

2021-06-09 Thread Jason Wang
在 2021/6/9 上午12:24, Andy Lutomirski 写道: On 6/3/21 10:53 PM, Jason Wang wrote: Hi: The virtio driver should not trust the device. This beame more urgent for the case of encrtpyed VM or VDUSE[1]. In both cases, technology like swiotlb/IOMMU is used to prevent the poking/mangling of memory from

Re: [RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support

2021-06-09 Thread Jason Wang
在 2021/6/10 上午7:24, Jiang Wang 写道: This patchset implements support of SOCK_DGRAM for virtio transport. Datagram sockets are connectionless and unreliable. To avoid unfair contention with stream and other sockets, add two more virtqueues and a new feature bit to indicate if those two new

[RFC v1 6/6] virtio/vsock: add sysfs for rx buf len for dgram

2021-06-09 Thread Jiang Wang
Make rx buf len configurable via sysfs Signed-off-by: Jiang Wang --- net/vmw_vsock/virtio_transport.c | 37 +++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/net/vmw_vsock/virtio_transport.c b/net/vmw_vsock/virtio_transport.c index

[RFC v1 5/6] vhost/vsock: add kconfig for vhost dgram support

2021-06-09 Thread Jiang Wang
Also change number of vqs according to the config Signed-off-by: Jiang Wang --- drivers/vhost/Kconfig | 8 drivers/vhost/vsock.c | 11 --- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig index

[RFC v1 4/6] vsock_test: add tests for vsock dgram

2021-06-09 Thread Jiang Wang
Added test cases for vsock dgram types. Signed-off-by: Jiang Wang --- tools/testing/vsock/util.c | 105 + tools/testing/vsock/util.h | 4 + tools/testing/vsock/vsock_test.c | 195 +++ 3 files changed, 304 insertions(+) diff

[RFC v1 3/6] vhost/vsock: add support for vhost dgram.

2021-06-09 Thread Jiang Wang
This patch supports dgram on vhost side, including tx and rx. The vhost send packets asynchronously. Signed-off-by: Jiang Wang --- drivers/vhost/vsock.c | 199 +++--- 1 file changed, 173 insertions(+), 26 deletions(-) diff --git

[RFC v1 2/6] virtio/vsock: add support for virtio datagram

2021-06-09 Thread Jiang Wang
This patch add support for virtio dgram for the driver. Implemented related functions for tx and rx, enqueue and dequeue. Send packets synchronously to give sender indication when the virtqueue is full. Refactored virtio_transport_send_pkt_work() a little bit but no functions changes for it.

[RFC v1 1/6] virtio/vsock: add VIRTIO_VSOCK_F_DGRAM feature bit

2021-06-09 Thread Jiang Wang
When this feature is enabled, allocate 5 queues, otherwise, allocate 3 queues to be compatible with old QEMU versions. Signed-off-by: Jiang Wang --- drivers/vhost/vsock.c | 3 +- include/linux/virtio_vsock.h | 9 + include/uapi/linux/virtio_vsock.h | 3 ++

[RFC v1 0/6] virtio/vsock: introduce SOCK_DGRAM support

2021-06-09 Thread Jiang Wang
This patchset implements support of SOCK_DGRAM for virtio transport. Datagram sockets are connectionless and unreliable. To avoid unfair contention with stream and other sockets, add two more virtqueues and a new feature bit to indicate if those two new queues exist or not. Dgram does not use

Re: [PATCH v3 0/4] virtio net: spurious interrupt related fixes

2021-06-09 Thread Willem de Bruijn
On Wed, Jun 9, 2021 at 5:36 PM Willem de Bruijn wrote: > > On Mon, May 31, 2021 at 10:53 PM Willem de Bruijn > wrote: > > > > On Wed, May 26, 2021 at 11:34 AM Willem de Bruijn > > wrote: > > > > > > On Wed, May 26, 2021 at 4:24 AM Michael S. Tsirkin > > > wrote: > > > > > > > > > > > > With

Re: [PATCH v3 1/4] virtio_net: move tx vq operation under tx queue lock

2021-06-09 Thread Michael S. Tsirkin
On Fri, May 28, 2021 at 06:25:11PM -0400, Willem de Bruijn wrote: > On Wed, May 26, 2021 at 11:41 PM Jason Wang wrote: > > > > > > 在 2021/5/26 下午4:24, Michael S. Tsirkin 写道: > > > It's unsafe to operate a vq from multiple threads. > > > Unfortunately this is exactly what we do when invoking > > >

Re: [PATCH v3 0/4] virtio net: spurious interrupt related fixes

2021-06-09 Thread Willem de Bruijn
On Mon, May 31, 2021 at 10:53 PM Willem de Bruijn wrote: > > On Wed, May 26, 2021 at 11:34 AM Willem de Bruijn > wrote: > > > > On Wed, May 26, 2021 at 4:24 AM Michael S. Tsirkin wrote: > > > > > > > > > With the implementation of napi-tx in virtio driver, we clean tx > > > descriptors from rx

Re: [PATCH 7/9] vhost: allow userspace to create workers

2021-06-09 Thread Mike Christie
On 6/7/21 10:19 AM, Stefan Hajnoczi wrote: > My concern is that threads should probably accounted against > RLIMIT_NPROC and max_threads rather than something indirect like 128 * > RLIMIT_NOFILE (a userspace process can only have RLIMIT_NOFILE > vhost-user file descriptors open). > Ah ok, I see

[PATCH 7/9] drm/xen: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective xen functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas

[PATCH 8/9] drm/rockchip: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective rockchip functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas

[PATCH 5/9] drm/qxl: Remove empty qxl_gem_prime_mmap()

2021-06-09 Thread Thomas Zimmermann
The function qxl_gem_prime_mmap() returns an error. The two callers of gem_prime_mmap are drm_fbdev_fb_mmap() and drm_gem_dmabuf_mmap(), which both already handle NULL-callbacks with an error code. So clear gem_prime_mmap in qxl and remove qxl_gem_prime_mmap(). Signed-off-by: Thomas Zimmermann

[PATCH 6/9] drm/vgem: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective vgem functions are being removed. The file_operations structure vgem_driver_fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by:

[PATCH 9/9] drm: Update documentation and TODO of gem_prime_mmap hook

2021-06-09 Thread Thomas Zimmermann
The hook gem_prime_mmap in struct drm_driver is deprecated. Document the new requirements. Signed-off-by: Thomas Zimmermann --- Documentation/gpu/todo.rst | 11 --- include/drm/drm_drv.h | 11 +++ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git

[PATCH 4/9] drm/msm: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective msm functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas

[PATCH 2/9] drm/exynox: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective exynos functions are being removed. The file_operations structure exynos_drm_driver_fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS().

[PATCH 3/9] drm/mediatek: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective mediatek functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas

[PATCH 1/9] drm/etnaviv: Implement mmap as GEM object function

2021-06-09 Thread Thomas Zimmermann
Moving the driver-specific mmap code into a GEM object function allows for using DRM helpers for various mmap callbacks. The respective etnaviv functions are being removed. The file_operations structure fops is now being created by the helper macro DEFINE_DRM_GEM_FOPS(). Signed-off-by: Thomas

[PATCH 0/9] drm: Implement gem_prime_mmap with drm_gem_prime_mmap()

2021-06-09 Thread Thomas Zimmermann
Replace all remaining implementations of struct drm_driver.gem_prime_mmap with use drm_gem_prime_mmap(). For each affected driver, put the mmap code into struct drm_gem_object_funcs.mmap. With the latter change in place, create struct file_operations via DEFINE_DRM_GEM_FOPS(). As next steps,

Re: [PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends

2021-06-09 Thread David Hildenbrand
On 08.06.21 13:18, David Hildenbrand wrote: On 08.06.21 13:11, Michael Ellerman wrote: David Hildenbrand writes: There is only a single user remaining. We can simply try to offline all online nodes - which is fast, because we usually span pages and can skip such nodes right away. That makes

Re: virtio-net: kernel panic in virtio_net.c

2021-06-09 Thread Xuan Zhuo
On Wed, 9 Jun 2021 10:03:53 +0200, Greg KH wrote: > On Wed, Jun 09, 2021 at 03:51:20PM +0800, Xuan Zhuo wrote: > > On Wed, 9 Jun 2021 08:24:20 +0200, Greg KH > > wrote: > > > On Wed, Jun 09, 2021 at 02:08:17PM +0800, Xuan Zhuo wrote: > > > > On Wed, 9 Jun 2021 06:50:10 +0200, Greg KH > > > >

Re: virtio-net: kernel panic in virtio_net.c

2021-06-09 Thread Greg KH
On Wed, Jun 09, 2021 at 03:51:20PM +0800, Xuan Zhuo wrote: > On Wed, 9 Jun 2021 08:24:20 +0200, Greg KH wrote: > > On Wed, Jun 09, 2021 at 02:08:17PM +0800, Xuan Zhuo wrote: > > > On Wed, 9 Jun 2021 06:50:10 +0200, Greg KH > > > wrote: > > > > On Wed, Jun 09, 2021 at 09:48:33AM +0800, Xuan Zhuo

Re: virtio-net: kernel panic in virtio_net.c

2021-06-09 Thread Xuan Zhuo
On Wed, 9 Jun 2021 08:24:20 +0200, Greg KH wrote: > On Wed, Jun 09, 2021 at 02:08:17PM +0800, Xuan Zhuo wrote: > > On Wed, 9 Jun 2021 06:50:10 +0200, Greg KH > > wrote: > > > On Wed, Jun 09, 2021 at 09:48:33AM +0800, Xuan Zhuo wrote: > > > > > > With this patch and the latest net branch I no

Re: [RFC v2] virtio-vsock: add description for datagram type

2021-06-09 Thread Stefano Garzarella
On Tue, Jun 08, 2021 at 09:31:28PM -0700, Jiang Wang . wrote: On Tue, May 18, 2021 at 9:59 PM Jiang Wang . wrote: On Tue, May 18, 2021 at 6:02 AM Stefano Garzarella wrote: > > On Mon, May 17, 2021 at 11:33:06PM -0700, Jiang Wang . wrote: > >On Mon, May 17, 2021 at 4:02 AM Stefano Garzarella

Re: [External] Re: [RFC v4] virtio-vsock: add description for datagram type

2021-06-09 Thread Stefano Garzarella
On Tue, Jun 08, 2021 at 09:22:26PM -0700, Jiang Wang . wrote: On Tue, Jun 8, 2021 at 6:46 AM Stefano Garzarella wrote: On Fri, May 28, 2021 at 04:01:18AM +, Jiang Wang wrote: >From: "jiang.wang" > >Add supports for datagram type for virtio-vsock. Datagram >sockets are connectionless and

Re: [PATCH] drm: qxl: ensure surf.data is ininitialized

2021-06-09 Thread Gerd Hoffmann
On Tue, Jun 08, 2021 at 05:13:13PM +0100, Colin King wrote: > From: Colin Ian King > > The object surf is not fully initialized and the uninitialized > field surf.data is being copied by the call to qxl_bo_create > via the call to qxl_gem_object_create. Set surf.data to zero > to ensure garbage

Re: virtio-net: kernel panic in virtio_net.c

2021-06-09 Thread Greg KH
On Wed, Jun 09, 2021 at 02:08:17PM +0800, Xuan Zhuo wrote: > On Wed, 9 Jun 2021 06:50:10 +0200, Greg KH wrote: > > On Wed, Jun 09, 2021 at 09:48:33AM +0800, Xuan Zhuo wrote: > > > > > With this patch and the latest net branch I no longer get crashes. > > > > > > > > Did this ever get properly

Re: virtio-net: kernel panic in virtio_net.c

2021-06-09 Thread Xuan Zhuo
On Wed, 9 Jun 2021 06:50:10 +0200, Greg KH wrote: > On Wed, Jun 09, 2021 at 09:48:33AM +0800, Xuan Zhuo wrote: > > > > With this patch and the latest net branch I no longer get crashes. > > > > > > Did this ever get properly submitted to the networking tree to get into > > > 5.13-final? > > > >