All of lore.kernel.org
 help / color / mirror / Atom feed
* DMA from stack in virtio_net and virtio_console
@ 2016-06-25  1:45 Andy Lutomirski
  2016-06-26  2:06 ` Michael S. Tsirkin
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2016-06-25  1:45 UTC (permalink / raw)
  To: Michael S. Tsirkin, Network Development, Amit Shah,
	Linux Virtualization, Jason Wang, Alex Williamson

virtio_net does DMA on the stack when it calls sg_init_one in
virtio_set_queues, virtnet_vlan_rx_add_vid, and
virtnet_vlan_rx_kill_vid.  Michael, I think these are examples we
missed somehow when fixing these issues earlier on.

virtio_console does it here:

sg_init_one(sg, &cpkt, sizeof(cpkt));

This will cause problems on some architectures (Xen at the very least,
and it'll cause more subtle problems on other architectures if they
start using the DMA API), and it will blow up horribly with virtually
mapped stacks.

Could you fix these, please?

Thanks,
Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: DMA from stack in virtio_net and virtio_console
  2016-06-25  1:45 DMA from stack in virtio_net and virtio_console Andy Lutomirski
@ 2016-06-26  2:06 ` Michael S. Tsirkin
  0 siblings, 0 replies; 2+ messages in thread
From: Michael S. Tsirkin @ 2016-06-26  2:06 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Amit Shah, Network Development, Alex Williamson, Linux Virtualization

On Fri, Jun 24, 2016 at 06:45:50PM -0700, Andy Lutomirski wrote:
> virtio_net does DMA on the stack when it calls sg_init_one in
> virtio_set_queues, virtnet_vlan_rx_add_vid, and
> virtnet_vlan_rx_kill_vid.  Michael, I think these are examples we
> missed somehow when fixing these issues earlier on.
> 
> virtio_console does it here:
> 
> sg_init_one(sg, &cpkt, sizeof(cpkt));
> 
> This will cause problems on some architectures (Xen at the very least,
> and it'll cause more subtle problems on other architectures if they
> start using the DMA API), and it will blow up horribly with virtually
> mapped stacks.
> 
> Could you fix these, please?
> 
> Thanks,
> Andy

Will do, thanks for the report.

-- 
MST

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-26  2:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-25  1:45 DMA from stack in virtio_net and virtio_console Andy Lutomirski
2016-06-26  2:06 ` Michael S. Tsirkin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.