virtualization.lists.linux-foundation.org archive mirror
 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).