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:	Sun, 19 Aug 2012 22:59:58 -0700
From:	Joel Becker <jlbec@...lplan.org>
To:	Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc:	Andrzej Pietrasiewicz <andrzej.p@...sung.com>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
	'Kyungmin Park' <kyungmin.park@...sung.com>,
	'Felipe Balbi' <balbi@...com>,
	'Greg Kroah-Hartman' <gregkh@...uxfoundation.org>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	'Alan Stern' <stern@...land.harvard.edu>
Subject: Re: [RFC 0/2] USB gadget - configfs

On Fri, Aug 17, 2012 at 12:34:11PM +0200, Sebastian Andrzej Siewior wrote:
> On 08/17/2012 12:30 PM, Andrzej Pietrasiewicz wrote:
> >>There is a separation between "setting myself up" and "seeing that a host
> >>wants to talk to me". You are a woman. And if you not done yet done you
> >ignore
> >>the host until you are ready. Can also be ready before the host wants to
> >talk
> >>to you. It depends on your mood / use case (give the use the choice
> >between
> >>storage&  network and offer always both because we are self powered).
> >>
> >
> >You never know when she is ready... ;)
> >
> >Please note, that in the example implementation it is userspace
> >who needs to explicitly store "1" into the "connect" attribute;
> >if it is not set, connecting the cable will have no effect and,
> >conversely, if the cable is connected but the "1" is not stored,
> >the gadget will not be seen by the host.
> 
> maybe we should rename "connect" here to "ready" or "available". It
> seems to cause confusion.

	I think what you want here is a symlink.  Create a directory
high in the tree called 'ready' or 'available', and when you want to
lock the device in place, symlink it into that directory.  This will pin
the item.  You can also make use of the ->allow_link() and ->drop_link()
callbacks to prevent symlinking an item until it is fully configured,
and prevent unlinking an item that is in use.

  $ ln -s /cfg/usb-function-gadget/G1/C1/F1/f_mass_storage/lun0 \
        /cfg/usb-function-gadget/ready/

or something like that.

Joel

-- 

"Born under a bad sign.
 I been down since I began to crawl.
 If it wasn't for bad luck,
 I wouldn't have no luck at all."

			http://www.jlbec.org/
			jlbec@...lplan.org
--
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