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]
Message-ID: <20171226135143.639c8476@xeon-e3>
Date:   Tue, 26 Dec 2017 13:51:43 -0800
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org, sthemmin@...rosoft.com
Subject: Re: [PATCH] hv_netvsc: update VF after name has changed.

On Tue, 26 Dec 2017 12:25:12 -0500 (EST)
David Miller <davem@...emloft.net> wrote:

> From: Stephen Hemminger <stephen@...workplumber.org>
> Date: Wed, 20 Dec 2017 14:33:23 -0800
> 
> > Since commit 6123c66854c1 ("netvsc: delay setup of VF device")
> > the automatic bring up of the VF is delayed to allow userspace (udev)
> > a chance to rename the device. This delay is problematic because
> > it delays boot and may not be long enough for some cases.
> > 
> > Instead, use the rename can be used to trigger the next step
> > in setup to happen immediately.
> > 
> > The VF initialization sequence now looks like:
> >    * hotplug causes VF network device probe to create network device
> >    * netvsc notifier joins VF with netvsc and schedules VF to be
> >      setup after timer expires
> >    * udev in userspace renames device
> >    * if netvsc notifier detects rename, it can cancel timer
> >      and do immediate setup
> > 
> > The delay can also be increased to allow for slower rules.
> > Still need the delayed work to handle the case where rename is
> > not done.
> > 
> > Signed-off-by: Stephen Hemminger <sthemmin@...rosoft.com>  
> 
> I'm still seriously perplexed by this whole situation.

See state diagram below
 
> Why can't you bring up a VF interface simply because of a text string
> used to reffered to it?

VF network device can not have its name changed if up.
The network device kernel API does not allow name change of network
device that is up.  There was a patch from Vitaly to allow this, but it
was deemed to be too risky.

   https://patchwork.ozlabs.org/patch/799646/

> If the VF interface were named "rabbit" I don't see why it can't be
> brought up until it is named "tiger"
> 
> I'm not applying any patches in this area until we have a better
> understanding of what the real issue is, and have a real solution
> that can be applied to any other VF interface implemented in the
> tree.

                       Netvsc                  VF Network
                       Device                  Device

                         |                       |
                         |                       |
udev network daemon      |                       +<------------- PCI hotplug
                         |    NETDEV_REGISTER    |
     +                   +<----------------------+ register_netdev
     |                                           |
     |                   |                       |
     |                   +---------------------->+
     |                   |  netdev_rx_handler    |
     |                   |                       |
     |                   +---------------------> |
     |                   | netdev_upper_dev_link |
     +<------------------+                       |
     |  udev device add  |                       |
     |                   |                       |
     |                   |                       |
     |                   |                       |
     +-------------------+---------------------> |
     |     rename eth1 to enp12s0                |
     |                   |     NETDEV_CHANGENAME |
     |                   <-----------------------+
     |                   |                       |
     |                   |                       |
     |                   +---------------------> |
     |                   |   dev_set_mtu         |
     |                   |                       |
     |                   +---------------------> |
     |                   |   dev_open            |
     |                   |                       |
     |                   |    NETDEV_UP          |
     |                   <-----------------------+
     v                   |                       |
                         |                       |
                         |                       |
                         +----------------------------------> Hyper-V host
                         |        RNDIS switch datapath
                         |                       |
                         v                       v

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ