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: <20111104170705.0553b8cf@nehalam.linuxnetplumber.net>
Date:	Fri, 4 Nov 2011 17:07:05 -0700
From:	Stephen Hemminger <shemminger@...tta.com>
To:	Rick Jones <rick.jones2@...com>
Cc:	Ben Hutchings <bhutchings@...arflare.com>, netdev@...r.kernel.org,
	rusty@...tcorp.com.au, mst@...hat.com
Subject: Re: what's in a bus_info

On Fri, 04 Nov 2011 17:05:05 -0700
Rick Jones <rick.jones2@...com> wrote:

> On 11/04/2011 04:42 PM, Ben Hutchings wrote:
> > On Fri, 2011-11-04 at 16:31 -0700, Rick Jones wrote:
> 
> >> I guess that wraps back around to the question of whether there is a
> >> "standard" for what should be in bus_info.  And if it is impractical to
> >> get the PCI bus information,
> >
> > I'm not that familiar with virtio, but would I be right in thinking that
> > the virtio 'bus' device is likely to be the child of a PCI device?  So
> > then you mgiht want to get bus_name() for the grandparent of the net
> > device:
> > 	dev_dev = dev->dev.parent->parent;
> > (possibly checking for nulls).
> 
> I'll take a look.
> 
> > If there's some reasonable way to distinguish a 'real' from a virtual
> > bus then we could have the generic implementation try to follow parents
> > until it finds a bus device.  However I think the device model
> > maintainers have been gradually moving away from the bus/class
> > distinction and so we may not be able to do that.
> >
> >> whether it is better to return virtioN or
> >> ethN.  Or perhaps something else entirely.
> > [...]
> >
> > Returning the device name seems entirely unhelpful since the user
> > already has that.  'virtioN' is perhaps not much better though.
> 
> Agreed, but thought I should ask :)

My view of bus_info, is that it is an informational string for administrators.
Tools shouldn't depend on the value.  If a tool wants to find out about
the physical device, then it should readlink the value of /sys/class/net/ethX/device
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ