Re: [Qemu-devel] [PATCH 1/1] virtio-net: check guest header length is valid

2019-07-16 Thread Michael S. Tsirkin
On Tue, Jul 16, 2019 at 03:38:09AM +, Oleinik, Alexander wrote: > virtio-net checks that the "out" sg is longer than the guest header, but > this check can be skipped if has_net_hdr is 0. Also perform this check > if host_hdr_len != guest_hdr_len This explanation is way less clear than what

[Qemu-devel] [PATCH 1/1] virtio-net: check guest header length is valid

2019-07-15 Thread Oleinik, Alexander
virtio-net checks that the "out" sg is longer than the guest header, but this check can be skipped if has_net_hdr is 0. Also perform this check if host_hdr_len != guest_hdr_len Signed-off-by: Alexander Oleinik --- hw/net/virtio-net.c | 13 - 1 file changed, 12 insertions(+), 1