Re: virtio-net: Unpermitted usage of virtqueue before virtio driver initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 20, 2022 at 10:17:27AM +0200, Maciej Szymański wrote:
> > > > > > Hmm so we have this:
> > > > > > 
> > > > > > 
> > > > > >          if ((dev->features ^ features) & NETIF_F_GRO_HW) {
> > > > > >                  if (vi->xdp_enabled)
> > > > > >                          return -EBUSY;
> > > > > > 
> > > > > >                  if (features & NETIF_F_GRO_HW)
> > > > > >                          offloads = vi->guest_offloads_capable;
> > > > > >                  else
> > > > > >                          offloads = vi->guest_offloads_capable &
> > > > > > ~GUEST_OFFLOAD_GRO_HW_MASK;
> > > > > > 
> > > > > >                  err = virtnet_set_guest_offloads(vi, offloads);
> > > > > >                  if (err)
> > > > > >                          return err;
> > > > > >                  vi->guest_offloads = offloads;
> > > > > >          }
> > > > > > 
> > > > > > which I guess should have prevented virtnet_set_guest_offloads
> > > > > > from ever running.
> > > > > > 
> > > > > >  From your description it sounds like you have observed this
> > > > > > in practice, right?
> > > > > > 
> > > Yes. I have proprietary virtio-net device which advertises following
> > > guest offload features :
> > > - VIRTIO_NET_F_GUEST_CSUM
> > > - VIRTIO_NET_F_GUEST_TSO4
> > > - VIRTIO_NET_F_GUEST_TSO6
> > > - VIRTIO_NET_F_GUEST_UFO
> > > 
> > > This feature set passes the condition in virtnet_set_features.

So why isn't dev->features equal to features?

-- 
MST

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux