Re: [PATCH v6 00/27] x86: PIE support and option to extend KASLR randomization

2019-01-31 Thread Konrad Rzeszutek Wilk
On Thu, Jan 31, 2019 at 11:24:07AM -0800, Thomas Garnier wrote: > There has been no major concern in the latest iterations. I am interested on > what would be the best way to slowly integrate this patchset upstream. One question that I was somehow expected in this cover letter - what about all

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Michael S. Tsirkin
On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: > Previously virtnet_xdp_xmit() did not account for device tx counters, > which caused confusions. > To be consistent with SKBs, account them on freeing xdp_frames. > > Reported-by: David Ahern > Signed-off-by: Toshiaki Makita

Re: [PATCH RFC] virtio: hint if callbacks surprisingly might sleep

2019-01-31 Thread Cornelia Huck
On Thu, 31 Jan 2019 10:27:53 -0500 "Michael S. Tsirkin" wrote: > On Thu, Jan 31, 2019 at 01:53:14PM +0100, Cornelia Huck wrote: > > A virtio transport is free to implement some of the callbacks in > > virtio_config_ops in a matter that they cannot be called from > > atomic context (e.g.

Re: [PATCH] dma: Uninline dma_max_mapping_size()

2019-01-31 Thread Michael S. Tsirkin
On Thu, Jan 31, 2019 at 03:37:23PM +0100, Christoph Hellwig wrote: > On Thu, Jan 31, 2019 at 02:01:27PM +0100, Joerg Roedel wrote: > > On Thu, Jan 31, 2019 at 11:41:29AM +0100, Christoph Hellwig wrote: > > > Sorry for not noticing last time, but since 5.0 we keep all non-fast > > > path DMA

Re: [PATCH] dma: Uninline dma_max_mapping_size()

2019-01-31 Thread Christoph Hellwig
On Thu, Jan 31, 2019 at 02:01:27PM +0100, Joerg Roedel wrote: > On Thu, Jan 31, 2019 at 11:41:29AM +0100, Christoph Hellwig wrote: > > Sorry for not noticing last time, but since 5.0 we keep all non-fast > > path DMA mapping interfaces out of line, so this should move to > > kernel/dma/mapping.c.

Re: [PATCH RFC] virtio: hint if callbacks surprisingly might sleep

2019-01-31 Thread Michael S. Tsirkin
On Thu, Jan 31, 2019 at 01:53:14PM +0100, Cornelia Huck wrote: > A virtio transport is free to implement some of the callbacks in > virtio_config_ops in a matter that they cannot be called from > atomic context (e.g. virtio-ccw, which maps a lot of the callbacks > to channel I/O, which is an

[PATCH] dma: Uninline dma_max_mapping_size()

2019-01-31 Thread Joerg Roedel
On Thu, Jan 31, 2019 at 11:41:29AM +0100, Christoph Hellwig wrote: > Sorry for not noticing last time, but since 5.0 we keep all non-fast > path DMA mapping interfaces out of line, so this should move to > kernel/dma/mapping.c. Okay, attached patch does that. It applies on-top of this patch-set.

Re: [PATCH v2 3/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource()

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Add format, width and height fields to the virtio_gpu_object_params > struct. With that in place we can use the parameter struct for > virtio_gpu_cmd_create_resource() calls too. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes

Re: [PATCH v2 net 0/7] virtio_net: Fix problems around XDP tx and napi_tx

2019-01-31 Thread David Miller
From: Toshiaki Makita Date: Tue, 29 Jan 2019 09:45:52 +0900 > While I'm looking into how to account standard tx counters on XDP tx > processing, I found several bugs around XDP tx and napi_tx. > > Patch1: Fix oops on error path. Patch2 depends on this. > Patch2: Fix memory corruption on freeing

Re: [PATCH 3/5] dma: Introduce dma_max_mapping_size()

2019-01-31 Thread Christoph Hellwig
> +static inline size_t dma_max_mapping_size(struct device *dev) > +{ > + const struct dma_map_ops *ops = get_dma_ops(dev); > + size_t size = SIZE_MAX; > + > + if (dma_is_direct(ops)) > + size = dma_direct_max_mapping_size(dev); > + else if (ops &&

Re: [PATCH v6 00/27] x86: PIE support and option to extend KASLR randomization

2019-01-31 Thread Kees Cook
On Fri, Feb 1, 2019 at 8:28 AM Thomas Garnier wrote: > These patches make the changes necessary to build the kernel as Position > Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below > the top 2G of the virtual address space. It allows to optionally extend the > KASLR

Re: [PATCH v2 1/6] drm/virtio: move virtio_gpu_object_{attach, detach} calls.

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Drop the dummy ttm backend implementation, add a real one for > TTM_PL_FLAG_TT objects. The bin/unbind callbacks will call > virtio_gpu_object_{attach,detach}, to update the object state > on the host side, instead of invoking those calls from the >

[PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Toshiaki Makita
Previously virtnet_xdp_xmit() did not account for device tx counters, which caused confusions. To be consistent with SKBs, account them on freeing xdp_frames. Reported-by: David Ahern Signed-off-by: Toshiaki Makita --- drivers/net/virtio_net.c | 20 1 file changed, 16

Re: [PATCH v2 4/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d()

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Add 3d resource parameters to virtio_gpu_object_params struct. With > that in place we can use it for virtio_gpu_cmd_resource_create_3d() > calls. > > Signed-off-by: Gerd Hoffmann > --- You don't remove the struct virtio_gpu_resource_create_3d

Re: [PATCH v2 5/6] drm/virtio: drop fencing in virtio_gpu_resource_create_ioctl

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > There is no need to wait for completion here. > > The host will process commands in submit order, so commands can > reference the new resource just fine even when queued up before > completion. > > On the guest side there is no need to wait for

Re: [PATCH net] vhost: fix OOB in get_rx_bufs()

2019-01-31 Thread David Miller
From: "Michael S. Tsirkin" Date: Tue, 29 Jan 2019 20:36:31 -0500 > If it helps I can include most virtio stuff in my pull requests instead. > Or if that can't work since there's too often a dependency on net-next, > maybe Jason wants to create a tree and send pull requests to you. Let > us know

[PATCH RFC] virtio: hint if callbacks surprisingly might sleep

2019-01-31 Thread Cornelia Huck
A virtio transport is free to implement some of the callbacks in virtio_config_ops in a matter that they cannot be called from atomic context (e.g. virtio-ccw, which maps a lot of the callbacks to channel I/O, which is an inherently asynchronous mechanism). This can be very surprising for

Re: [PATCH v2 6/6] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Specifically call virtio_gpu_object_create() before ttm_bo_init(), so > the object is already created when ttm calls the > virtio_gpu_ttm_tt_bind() callback (which in turn calls > virtio_gpu_object_attach()). > > With that in place

Re: [PATCH v2 2/6] drm/virtio: use struct to pass params to virtio_gpu_object_create()

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Create virtio_gpu_object_params, use that to pass object parameters to > virtio_gpu_object_create. This is just the first step, followup patches > will add more parameters to the struct. The plan is to use the struct > for all object parameters. >

Re: [PATCH 0/5 v5] Fix virtio-blk issue with SWIOTLB

2019-01-31 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 01:35:13PM -0500, Konrad Rzeszutek Wilk wrote: > On Wed, Jan 30, 2019 at 05:40:02PM +0100, Joerg Roedel wrote: > > Hi, > > > > here is the next version of this patch-set. Previous > > versions can be found here: > > > > V1:

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread Jesper Dangaard Brouer
On Thu, 31 Jan 2019 09:45:23 -0800 (PST) David Miller wrote: > From: "Michael S. Tsirkin" > Date: Thu, 31 Jan 2019 10:25:17 -0500 > > > On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: > >> Previously virtnet_xdp_xmit() did not account for device tx counters, > >> which

Re: [PATCH net] virtio_net: Account for tx bytes and packets on sending xdp_frames

2019-01-31 Thread David Miller
From: "Michael S. Tsirkin" Date: Thu, 31 Jan 2019 10:25:17 -0500 > On Thu, Jan 31, 2019 at 08:40:30PM +0900, Toshiaki Makita wrote: >> Previously virtnet_xdp_xmit() did not account for device tx counters, >> which caused confusions. >> To be consistent with SKBs, account them on freeing

Re: [PATCH] dma: Uninline dma_max_mapping_size()

2019-01-31 Thread Joerg Roedel
On Thu, Jan 31, 2019 at 09:43:51AM -0500, Michael S. Tsirkin wrote: > OK. Joerg can you repost the series with this squashed > and all acks applied? Sure, sent out now as v6. Regards, Joerg ___ Virtualization mailing list

[PATCH 5/5] virtio-blk: Consider virtio_max_dma_size() for maximum segment size

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel Segments can't be larger than the maximum DMA mapping size supported on the platform. Take that into account when setting the maximum segment size for a block device. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel ---

[PATCH 3/5] dma: Introduce dma_max_mapping_size()

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be mapped using DMA-API functions. The patch also adds the implementation for direct DMA and a new dma_map_ops pointer so that other implementations can expose their limit. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by:

[PATCH 4/5] virtio: Introduce virtio_max_dma_size()

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel This function returns the maximum segment size for a single dma transaction of a virtio device. The possible limit comes from the SWIOTLB implementation in the Linux kernel, that has an upper limit of (currently) 256kb of contiguous memory it can map. Other DMA-API

[PATCH 1/5] swiotlb: Introduce swiotlb_max_mapping_size()

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel The function returns the maximum size that can be remapped by the SWIOTLB implementation. This function will be later exposed to users through the DMA-API. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel ---

[PATCH 2/5] swiotlb: Add is_swiotlb_active() function

2019-01-31 Thread Joerg Roedel
From: Joerg Roedel This function will be used from dma_direct code to determine the maximum segment size of a dma mapping. Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Christoph Hellwig Signed-off-by: Joerg Roedel --- include/linux/swiotlb.h | 6 ++ kernel/dma/swiotlb.c| 9

[PATCH 0/5 v6] Fix virtio-blk issue with SWIOTLB

2019-01-31 Thread Joerg Roedel
Hi, here is the next version of this patch-set. Previous versions can be found here: V1: https://lore.kernel.org/lkml/20190110134433.15672-1-j...@8bytes.org/ V2: https://lore.kernel.org/lkml/20190115132257.6426-1-j...@8bytes.org/ V3: