Re: [PATCH v7 00/12] x86: PIE support to extend KASLR randomization

2019-06-10 Thread Kees Cook
On Mon, May 20, 2019 at 04:19:25PM -0700, Thomas Garnier wrote: > Splitting the previous serie in two. This part contains assembly code > changes required for PIE but without any direct dependencies with the > rest of the patchset. Thanks for doing this! It should be easier to land the "little" fi

[PATCH v2 4/4] drm/virtio: Add memory barriers for capset cache.

2019-06-10 Thread davidriley
From: David Riley After data is copied to the cache entry, atomic_set is used indicate that the data is the entry is valid without appropriate memory barriers. Similarly the read side was missing the corresponding memory barriers. Signed-off-by: David Riley --- drivers/gpu/drm/virtio/virtgpu_i

[PATCH v2 3/4] drm/virtio: Fix cache entry creation race.

2019-06-10 Thread davidriley
From: David Riley virtio_gpu_cmd_get_capset would check for the existence of an entry under lock. If it was not found, it would unlock and call virtio_gpu_cmd_get_capset to create a new entry. The new entry would be added it to the list without checking if it was added by another task during th

[PATCH v2 2/4] drm/virtio: Wake up all waiters when capset response comes in.

2019-06-10 Thread davidriley
From: David Riley If multiple callers occur simultaneously, wake them all up. Signed-off-by: David Riley --- drivers/gpu/drm/virtio/virtgpu_vq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_vq.c b/drivers/gpu/drm/virtio/virtgpu_vq.c index

[PATCH v2 0/4] drm/virtio: Ensure cached capset entries are valid before copying.

2019-06-10 Thread davidriley
From: David Riley v2: Updated barriers. David Riley (4): drm/virtio: Ensure cached capset entries are valid before copying. drm/virtio: Wake up all waiters when capset response comes in. drm/virtio: Fix cache entry creation race. drm/virtio: Add memory barriers for capset cache. drive

[PATCH v2 1/4] drm/virtio: Ensure cached capset entries are valid before copying.

2019-06-10 Thread davidriley
From: David Riley virtio_gpu_get_caps_ioctl could return success with invalid data if a second caller to the function occurred after the entry was created in virtio_gpu_cmd_get_capset but prior to the virtio_gpu_cmd_capset_cb callback being called. This could leak contents of memory as well sinc

Re: [PATCH v11 4/7] dm: enable synchronous dax

2019-06-10 Thread Mike Snitzer
On Mon, Jun 10 2019 at 5:07am -0400, Pankaj Gupta wrote: > This patch sets dax device 'DAXDEV_SYNC' flag if all the target > devices of device mapper support synchrononous DAX. If device > mapper consists of both synchronous and asynchronous dax devices, > we don't set 'DAXDEV_SYNC' flag. >

Re: [PATCH v3 1/5] vsock/virtio: limit the memory used per-socket

2019-06-10 Thread Stefan Hajnoczi
On Fri, May 31, 2019 at 03:39:50PM +0200, Stefano Garzarella wrote: > Since virtio-vsock was introduced, the buffers filled by the host > and pushed to the guest using the vring, are directly queued in > a per-socket list. These buffers are preallocated by the guest > with a fixed size (4 KB). > >

Re: [PATCH 0/4] vsock/virtio: several fixes in the .probe() and .remove()

2019-06-10 Thread Stefan Hajnoczi
On Tue, May 28, 2019 at 12:56:19PM +0200, Stefano Garzarella wrote: > During the review of "[PATCH] vsock/virtio: Initialize core virtio vsock > before registering the driver", Stefan pointed out some possible issues > in the .probe() and .remove() callbacks of the virtio-vsock driver. > > This se

[PATCH v11 7/7] xfs: disable map_sync for async flush

2019-06-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 9

[PATCH v11 6/7] ext4: disable map_sync for async flush

2019-06-10 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10 ++

[PATCH v11 5/7] dax: check synchronous mapping is supported

2019-06-10 Thread Pankaj Gupta
This patch introduces 'daxdev_mapping_supported' helper which checks if 'MAP_SYNC' is supported with filesystem mapping. It also checks if corresponding dax_device is synchronous. Virtio pmem device is asynchronous and does not not support VM_SYNC. Suggested-by: Jan Kara Signed-off-by: Pankaj Gup

[PATCH v11 4/7] dm: enable synchronous dax

2019-06-10 Thread Pankaj Gupta
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. Signed-off-by: Pankaj Gupta --- drivers/md/dm-table.c | 14

[PATCH v11 3/7] libnvdimm: add dax_dev sync flag

2019-06-10 Thread Pankaj Gupta
This patch adds 'DAXDEV_SYNC' flag which is set for nd_region doing synchronous flush. This later is used to disable MAP_SYNC functionality for ext4 & xfs filesystem for devices don't support synchronous flush. Signed-off-by: Pankaj Gupta --- drivers/dax/bus.c| 2 +- drivers/dax/sup

[PATCH v11 2/7] virtio-pmem: Add virtio pmem driver

2019-06-10 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this into sy

[PATCH v11 1/7] libnvdimm: nd_region flush callback support

2019-06-10 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host fsy

[PATCH v11 0/7] virtio pmem driver

2019-06-10 Thread Pankaj Gupta
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 & VIRTIO patches. Need an ack on device mapper change in patch 4. Mike, Can you please review and ack patch4. This version does not has any additonal code change from v10 and is