On Mon, 13 Jul 2015 11:22:09 +0300
"Michael S. Tsirkin" wrote:
> On Mon, Jul 13, 2015 at 10:24:59AM +0300, Michael S. Tsirkin wrote:
> > On Mon, Jul 13, 2015 at 01:46:51PM +0800, Jason Wang wrote:
> > > Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
> > > ("virtio-net: byteswap virtio-net header"
On Mon, Jul 13, 2015 at 12:54:02PM +0200, Greg Kurz wrote:
> On Mon, 13 Jul 2015 11:22:09 +0300
> "Michael S. Tsirkin" wrote:
> > On Mon, Jul 13, 2015 at 10:24:59AM +0300, Michael S. Tsirkin wrote:
> > > On Mon, Jul 13, 2015 at 01:46:51PM +0800, Jason Wang wrote:
> > > > Commit 032a74a1c0fcdd5fd1c
On Mon, Jul 13, 2015 at 10:24:59AM +0300, Michael S. Tsirkin wrote:
> On Mon, Jul 13, 2015 at 01:46:51PM +0800, Jason Wang wrote:
> > Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
> > ("virtio-net: byteswap virtio-net header") breaks any layout by
> > requiring out_sg[0].iov_len >= n->guest_hdr_l
On 07/13/2015 03:24 PM, Michael S. Tsirkin wrote:
> On Mon, Jul 13, 2015 at 01:46:51PM +0800, Jason Wang wrote:
>> Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
>> ("virtio-net: byteswap virtio-net header") breaks any layout by
>> requiring out_sg[0].iov_len >= n->guest_hdr_len. Fixing this by
On 07/13/2015 02:50 PM, Paolo Bonzini wrote:
>
> On 13/07/2015 07:46, Jason Wang wrote:
>> -if (out_sg[0].iov_len < n->guest_hdr_len) {
>> +s = iov_to_buf(out_sg, out_num, 0, &hdr, sizeof(hdr));
>> +if (s != sizeof(hdr)) {
>> error_report("virt
On Mon, Jul 13, 2015 at 01:46:51PM +0800, Jason Wang wrote:
> Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
> ("virtio-net: byteswap virtio-net header") breaks any layout by
> requiring out_sg[0].iov_len >= n->guest_hdr_len. Fixing this by
> copying header to temporary buffer and copying it back
On 13/07/2015 07:46, Jason Wang wrote:
> -if (out_sg[0].iov_len < n->guest_hdr_len) {
> +s = iov_to_buf(out_sg, out_num, 0, &hdr, sizeof(hdr));
> +if (s != sizeof(hdr)) {
> error_report("virtio-net header incorrect");
> exit(1)
Commit 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
("virtio-net: byteswap virtio-net header") breaks any layout by
requiring out_sg[0].iov_len >= n->guest_hdr_len. Fixing this by
copying header to temporary buffer and copying it back after byteswap.
Fixes 032a74a1c0fcdd5fd1c69e56126b4c857ee36611
("vi