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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090217192155.GA2612@yzhao-otc.sh.intel.com>
Date:	Wed, 18 Feb 2009 03:21:55 +0800
From:	Yu Zhao <yu.zhao@...el.com>
To:	Greg KH <greg@...ah.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v9 6/7] PCI: document SR-IOV sysfs entries

On Wed, Feb 18, 2009 at 03:19:16PM +0800, Greg KH wrote:
> On Wed, Feb 18, 2009 at 01:01:35AM +0800, Yu Zhao wrote:
> > On Wed, Feb 18, 2009 at 02:21:16PM +0800, Greg KH wrote:
> > > On Tue, Feb 17, 2009 at 10:43:03PM +0800, Yu Zhao wrote:
> > > > On Wed, Feb 18, 2009 at 11:49:10AM +0800, Greg KH wrote:
> > > > > On Tue, Feb 17, 2009 at 08:50:21PM +0800, Yu Zhao wrote:
> > > > > > I'd like to create a subdirectory under PCI device sysfs directory and
> > > > > > put some symbol links into that directory (only symbol links). Should I
> > > > > > use `device' or `kobject'? Currently I use `device' and get two extra
> > > > > > file/directory (uevent and power) which look like useless for my case
> > > > > > because this subdirectory doesn't reflect a real device.
> > > > > 
> > > > > Neither, just use an attribute group, no new struct device should be
> > > > > needed at all.
> > > > 
> > > > Yes, I was thinking using an attribute group, however, it looks like we
> > > > can't put symbol link into a group. Maybe I'm wrong, shed some light,
> > > > please?
> > > 
> > > Why would you want a symbolic link in an attribute group?
> > 
> > Sorry I didn't make myself clear. I'd like to create a subdirectory (its
> > parent is controlled by a `struct device') to only hold symbol links.
> 
> Ick.  What would those links be to?  And what are they for?
> 
> > Can I use an `attribute group' of the parent `struct device' for this,
> > or a child `struct device', or a bare `struct kobject'?
> 
> You can't use an attribute group for symlinks.
> You should use a struct device, but be careful, you are going to be
> creating uevents that I don't think you really want to.

Thank you for the clarification.

> 
> Care to describe what you are trying to do first?

I'd like to link child PCI devices to their parent PCI device's
subdirectory.  These child PCI devices are PCI functions that are on
the same level as their parent in the PCI hierarchy, so current PCI code
won't create symbol links for them in their parent directory as what it
does for PCI bridge. For example, device 01:00.0 is the parent and 01:00.1
is the child, I'd like to put a symbol link into
/sys/bus/pci/device/0000:01:00.0/child/ which points to
/sys/bus/pci/device/0000:01:00.1.  This can let user space application
know the relationship between this two devices.

Regards,
Yu
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ