lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 28 May 2021 10:58:01 +0000
From:   wangyunjian <wangyunjian@...wei.com>
To:     Jason Wang <jasowang@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "mst@...hat.com" <mst@...hat.com>,
        "virtualization@...ts.linux-foundation.org" 
        <virtualization@...ts.linux-foundation.org>,
        dingxiaoxiong <dingxiaoxiong@...wei.com>
Subject: RE: [PATCH net-next] virtio_net: set link state down when virtqueue
 is broken

> -----Original Message-----
> > From: Yunjian Wang <wangyunjian@...wei.com>
> >
> > The NIC can't receive/send packets if a rx/tx virtqueue is broken.
> > However, the link state of the NIC is still normal. As a result, the
> > user cannot detect the NIC exception.
> 
> 
> Doesn't we have:
> 
>         /* This should not happen! */
>          if (unlikely(err)) {
>                  dev->stats.tx_fifo_errors++;
>                  if (net_ratelimit())
>                          dev_warn(&dev->dev,
>                                   "Unexpected TXQ (%d) queue
> failure: %d\n",
>                                   qnum, err);
>                  dev->stats.tx_dropped++;
>                  dev_kfree_skb_any(skb);
>                  return NETDEV_TX_OK;
>          }
> 
> Which should be sufficient?

There may be other reasons for this error, e.g -ENOSPC(no free desc).
And if rx virtqueue is broken, there is no error statistics.

> 
> 
> >
> > The driver can set the link state down when the virtqueue is broken.
> > If the state is down, the user can switch over to another NIC.
> 
> 
> Note that, we probably need the watchdog for virtio-net in order to be a
> complete solution.

Yes, I can think of is that the virtqueue's broken exception is detected on watchdog.
Is there anything else that needs to be done?

Thanks

> 
> Thanks
> 
> 
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ