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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170113120955.GJ6774@orbyte.nwl.cc>
Date:   Fri, 13 Jan 2017 13:09:55 +0100
From:   Phil Sutter <phil@....cc>
To:     David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [net-next PATCH v6 0/3] net: dummy: Introduce dummy virtual
 functions

On Wed, Jan 11, 2017 at 02:38:57PM +0100, Phil Sutter wrote:
> On Fri, Jan 06, 2017 at 08:38:04PM -0500, David Miller wrote:
> > From: Phil Sutter <phil@....cc>
> > Date: Thu,  5 Jan 2017 20:09:10 +0100
> > 
> > > This series adds VF support to dummy device driver after adding the
> > > necessary infrastructure changes:
> > > 
> > > Patch 1 adds a netdevice callback for device-specific VF count
> > > retrieval. Patch 2 then changes dev_num_vf() implementation to make use
> > > of that new callback (if implemented), falling back to the old
> > > behaviour. Patch 3 then implements VF support in dummy, without the fake
> > > PCI parent device hack from v5.
> > 
> > Please don't make this a netdev specific method and interface.
> > 
> > Put the method in "struct bus_device", thereby making it a generic
> > "device" layer thing.
> > 
> > So the pci BUS type will implement pci_bus_type.num_vf().  And you'll
> > make a bus type for the dummy device to attach to which will implement
> > it's own.
> 
> Following your approach, I'm running into a weird issue with conflicting
> sysfs symlink names after calling register_netdevice for the dummy
> device which has dev->dev.bus set to the dummy bus type I introduced:
> 
> In netdev_register_kobject, dev->class is set to &net_class. This means
> that later in device_add, the call to device_add_class_symlinks will
> create symlink to the class named devices/virtual/net/dummy0/subsystem.
> 
> The following call to bus_add_device by device_add though tries to
> create a symlink to the bus with identical name.

Ah, nevermind - it's actually the netdev's parent which should have the
bus type set. At first I assumed this would be a PCI specific thing.

Thanks, Phil

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ