]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
virtio-console: avoid DMA from stack
authorOmar Sandoval <osandov@fb.com>
Wed, 1 Feb 2017 08:02:27 +0000 (00:02 -0800)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 17 May 2017 16:38:02 +0000 (13:38 -0300)
commit40a686b2a6069626e5fca3f7036352ca09515c91
treec6e2466cd08ee809d0e94ff4f8f73f8747dd305b
parentd7e79b0367e0f2d6635aaa5b6fd06dc04b97d1d0
virtio-console: avoid DMA from stack

BugLink: http://bugs.launchpad.net/bugs/1687045
commit c4baad50297d84bde1a7ad45e50c73adae4a2192 upstream.

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@fb.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Amit Shah <amit.shah@redhat.com>
Cc: Ben Hutchings <ben@decadent.org.uk>
Cc: Brad Spengler <spender@grsecurity.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/char/virtio_console.c