search for: config_vmap_stack

Displaying 20 results from an estimated 44 matches for "config_vmap_stack".

2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...t;ffffffffbc917589>] entry_SYSCALL64_slow_path+0x25/0x25 Code: ca 75 2c 49 8b 55 08 f6 c2 01 75 25 83 e2 03 81 e3 ff 0f 00 00 45 89 65 14 48 RIP [<ffffffffbc4896fc>] sg_init_one+0x8c/0xa0 RSP <ffffb06e41043698> ---[ end trace 9076d2284efbf735 ]--- This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses struct sockaddr from the stack and virtnet_set_mac_address calls sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); I know there have been a lot of CONFIG_VMAP_STACK fixes around but I didn't find this one reported yet. Thanks, Laura
2016 Dec 05
1
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
...t;ffffffffbc917589>] entry_SYSCALL64_slow_path+0x25/0x25 Code: ca 75 2c 49 8b 55 08 f6 c2 01 75 25 83 e2 03 81 e3 ff 0f 00 00 45 89 65 14 48 RIP [<ffffffffbc4896fc>] sg_init_one+0x8c/0xa0 RSP <ffffb06e41043698> ---[ end trace 9076d2284efbf735 ]--- This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses struct sockaddr from the stack and virtnet_set_mac_address calls sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); I know there have been a lot of CONFIG_VMAP_STACK fixes around but I didn't find this one reported yet. Thanks, Laura
2017 Feb 01
3
[PATCH] virtio-console: avoid DMA from stack
From: Omar Sandoval <osandov at fb.com> put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov at fb.com> --- Patch based on v4.10-rc6. drivers/char/virtio_console.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/char/virtio_console.c b...
2017 Feb 01
3
[PATCH] virtio-console: avoid DMA from stack
From: Omar Sandoval <osandov at fb.com> put_chars() stuffs the buffer it gets into an sg, but that buffer may be on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it manifested as printks getting turned into NUL bytes). Signed-off-by: Omar Sandoval <osandov at fb.com> --- Patch based on v4.10-rc6. drivers/char/virtio_console.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/char/virtio_console.c b...
2017 Jan 04
2
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
Hi Christoph, 2017-01-04 6:25 GMT+01:00 Christoph Hellwig <hch at lst.de>: > Most users of BLOCK_PC requests allocate the sense buffer on the stack, > so to avoid DMA to the stack copy them to a field in the heap allocated > virtblk_req structure. Without that any attempt at SCSI passthrough I/O, > including the SG_IO ioctl from userspace will crash the kernel. Note that >
2017 Jan 05
1
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
2017-01-05 10:57 GMT+01:00 Christoph Hellwig <hch at lst.de>: > On Wed, Jan 04, 2017 at 04:47:03PM +0100, ??? wrote: >> This sounds scary. >> Could you share how to reproduce it, this should go into stable if >> it's the case. > > Step 1: Build your kernel with CONFIG_VMAP_STACK=y > Step 2: issue a SG_IO ioctl, e.g. sg_inq /dev/vda > Thanks, so it's only relevant to kernel > 4.9, as CONFIG_VMAP_STACK only introduced in 4.9 kernel. Regards, Jinpu
2017 Jan 04
2
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
Hi Christoph, 2017-01-04 6:25 GMT+01:00 Christoph Hellwig <hch at lst.de>: > Most users of BLOCK_PC requests allocate the sense buffer on the stack, > so to avoid DMA to the stack copy them to a field in the heap allocated > virtblk_req structure. Without that any attempt at SCSI passthrough I/O, > including the SG_IO ioctl from userspace will crash the kernel. Note that >
2017 Jan 05
1
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
2017-01-05 10:57 GMT+01:00 Christoph Hellwig <hch at lst.de>: > On Wed, Jan 04, 2017 at 04:47:03PM +0100, ??? wrote: >> This sounds scary. >> Could you share how to reproduce it, this should go into stable if >> it's the case. > > Step 1: Build your kernel with CONFIG_VMAP_STACK=y > Step 2: issue a SG_IO ioctl, e.g. sg_inq /dev/vda > Thanks, so it's only relevant to kernel > 4.9, as CONFIG_VMAP_STACK only introduced in 4.9 kernel. Regards, Jinpu
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek...
2016 Dec 06
3
[PATCH] virtio-net: Fix DMA-from-the-stack in virtnet_set_mac_address()
With CONFIG_VMAP_STACK=y, virtnet_set_mac_address() can be passed a pointer to the stack and it will OOPS. Copy the address to the heap to prevent the crash. Cc: Michael S. Tsirkin <mst at redhat.com> Cc: Jason Wang <jasowang at redhat.com> Cc: Laura Abbott <labbott at redhat.com> Reported-by: zbyszek...
2016 Dec 07
0
Oops with CONFIG_VMAP_STCK and bond device + virtio-net
On Mon, Dec 5, 2016 at 3:53 PM, Laura Abbott <labbott at redhat.com> wrote: > This looks like an issue with CONFIG_VMAP_STACK since bond_enslave uses > struct sockaddr from the stack and virtnet_set_mac_address calls > sg_init_one which triggers BUG_ON(!virt_addr_valid(buf)); > > I know there have been a lot of CONFIG_VMAP_STACK fixes around but I > didn't find this one reported yet. Fixed by: commit...
2017 Mar 01
1
[PATCH] virtio-console: avoid DMA from stack
...eb 01, 2017 at 07:17:12PM +0530, Amit Shah wrote: > On (Wed) 01 Feb 2017 [00:02:27], Omar Sandoval wrote: > > From: Omar Sandoval <osandov at fb.com> > > > > put_chars() stuffs the buffer it gets into an sg, but that buffer may be > > on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it > > manifested as printks getting turned into NUL bytes). > > Seems reasonable. I wonder since all implementations of hvc do a > memcpy, if we can abstract it - but that'll need some work. > > Reviewed-by: Amit Shah <amit.shah at redhat.com> > &gt...
2017 Mar 01
1
[PATCH] virtio-console: avoid DMA from stack
...eb 01, 2017 at 07:17:12PM +0530, Amit Shah wrote: > On (Wed) 01 Feb 2017 [00:02:27], Omar Sandoval wrote: > > From: Omar Sandoval <osandov at fb.com> > > > > put_chars() stuffs the buffer it gets into an sg, but that buffer may be > > on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it > > manifested as printks getting turned into NUL bytes). > > Seems reasonable. I wonder since all implementations of hvc do a > memcpy, if we can abstract it - but that'll need some work. > > Reviewed-by: Amit Shah <amit.shah at redhat.com> > &gt...
2017 Jan 05
0
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
On Wed, Jan 04, 2017 at 04:47:03PM +0100, ??? wrote: > This sounds scary. > Could you share how to reproduce it, this should go into stable if > it's the case. Step 1: Build your kernel with CONFIG_VMAP_STACK=y Step 2: issue a SG_IO ioctl, e.g. sg_inq /dev/vda
2017 Jan 05
0
[PATCH] virtio_blk: avoid DMA to stack for the sense buffer
On Thu, Jan 05, 2017 at 11:37:46AM +0100, ??? wrote: > Thanks, so it's only relevant to kernel > 4.9, as CONFIG_VMAP_STACK > only introduced in 4.9 kernel. kernel >= 4.9, but otherwise, yes.
2017 Feb 01
0
[PATCH] virtio-console: avoid DMA from stack
On (Wed) 01 Feb 2017 [00:02:27], Omar Sandoval wrote: > From: Omar Sandoval <osandov at fb.com> > > put_chars() stuffs the buffer it gets into an sg, but that buffer may be > on the stack. This breaks with CONFIG_VMAP_STACK=y (for me, it > manifested as printks getting turned into NUL bytes). Seems reasonable. I wonder since all implementations of hvc do a memcpy, if we can abstract it - but that'll need some work. Reviewed-by: Amit Shah <amit.shah at redhat.com> Michael, please add to the virtio queu...
2017 Oct 09
0
[virtio-dev] [RFC] virtio-iommu version 0.4
...of kmalloc. Thanks, Jean --- 8< --- >From 3fc957560e1e6f070a0468bf75ebc4862d37ff82 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Brucker <jean-philippe.brucker at arm.com> Date: Mon, 9 Oct 2017 20:13:57 +0100 Subject: [PATCH] iommu/virtio-iommu: Allocate all requests on the heap When CONFIG_VMAP_STACK is enabled, DMA on the stack isn't allowed. Instead of allocating virtio-iommu requests on the stack, use kmalloc. Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker at arm.com> --- drivers/iommu/virtio-iommu.c | 86 +++++++++++++++++++++++++++++--------------- 1 file changed,...
2016 Nov 22
5
[PATCH v2 0/2] virtio-crypto: add Linux driver
...o algorithms. Currently it's only support AES-CBC. The Crypto guys can mainly focus to this file. Actually I have no idea the virtio-crypto driver should be gone in whose tree, Michael's or Herbert's? Would you give me a feedback? Thanks a lot! v2: - stop doing DMA from the stack, CONFIG_VMAP_STACK=y [Salvatore] - convert __virtio32/64 to __le32/64 in virtio_crypto.h - remove VIRTIO_CRYPTO_S_STARTED based on the lastest virtio crypto spec. - introduces the little edian functions for VIRTIO_1 devices in patch 1. Gonglei (2): virtio: introduce little edian functions for virtio_cread/write...
2016 Nov 22
5
[PATCH v2 0/2] virtio-crypto: add Linux driver
...o algorithms. Currently it's only support AES-CBC. The Crypto guys can mainly focus to this file. Actually I have no idea the virtio-crypto driver should be gone in whose tree, Michael's or Herbert's? Would you give me a feedback? Thanks a lot! v2: - stop doing DMA from the stack, CONFIG_VMAP_STACK=y [Salvatore] - convert __virtio32/64 to __le32/64 in virtio_crypto.h - remove VIRTIO_CRYPTO_S_STARTED based on the lastest virtio crypto spec. - introduces the little edian functions for VIRTIO_1 devices in patch 1. Gonglei (2): virtio: introduce little edian functions for virtio_cread/write...
2016 Dec 15
2
[PATCH v8 0/1] virtio-crypto: add Linux driver
...definations, and function declarations. 5) virtio_crypto_algs.c is the realization of algs based on Linux Crypto Framwork, which can register different crypto algorithms. Currently it's only support AES-CBC. The Crypto guys can mainly focus on this file. v2: - stop doing DMA from the stack, CONFIG_VMAP_STACK=y [Salvatore] - convert __virtio32/64 to __le32/64 in virtio_crypto.h - remove VIRTIO_CRYPTO_S_STARTED based on the lastest virtio crypto spec. - introduces the little edian functions for VIRTIO_1 devices in patch 1. Gonglei (1): crypto: add virtio-crypto driver MAINTAINERS...