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]
Date:	Tue, 31 Mar 2015 11:33:50 +1100
From:	NeilBrown <neilb@...e.de>
To:	Peter Hurley <peter@...leysoftware.com>
Cc:	NeilBrown <neil@...wn.name>, Mark Rutland <mark.rutland@....com>,
	One Thousand Gnomes <gnomes@...rguk.ukuu.org.uk>,
	Arnd Bergmann <arnd@...db.de>, devicetree@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Sebastian Reichel <sre@...nel.org>,
	linux-kernel@...r.kernel.org,
	GTA04 owners <gta04-owner@...delico.com>,
	Pavel Machek <pavel@....cz>,
	Grant Likely <grant.likely@...aro.org>,
	Jiri Slaby <jslaby@...e.cz>
Subject: Re: [Gta04-owner] [PATCH 2/3] TTY: add support for tty_slave
 devices.

On Fri, 27 Mar 2015 07:09:56 -0400 Peter Hurley <peter@...leysoftware.com>
wrote:

> On 03/25/2015 05:17 PM, NeilBrown wrote:
> > On Wed, 25 Mar 2015 12:30:00 -0400 Peter Hurley <peter@...leysoftware.com>
> > wrote:
> > 
> >> On 03/18/2015 01:58 AM, NeilBrown wrote:
> >>
> >>> + * A "tty-slave" is a device permanently attached to a particularly
> >>> + * tty, typically wired to a UART.
> >>
> >> Why "permanently"?
> >> Is that a limitation of the implementation or design?
> >>
> > 
> > The slave is described in devicetree - that only happens for permanently
> > attached devices, doesn't it?
> > 
> > I guess that with device-tree overlays and 'capes' for boards you could have
> > a device attached to the uart "for this power session" rather than
> > "permanently", but I think it is a rather subtle distinction.
> > 
> > Did you have something else in mind?
> 
> My primary concern is that the abstraction match the scope.
> 
> If the abstraction is at the tty layer, then the scope of the design
> should support tty devices, not just hard-wired, devicetree-defined uarts.

I think I see your point, and I tend to agree.  However there is a limit to
how closely we can reach the ideal...

I see a lot of conceptual overlap between line discipline and tty_slaves.
They both provide extra driver support for the thing which the tty talks to.

Line disciplines can be configured at runtime depending on what is found to
be attached.  tty_slaves are configure at boot time depending what is
declared to be attached in device-tree.

line disciplines are a lot like device drivers, but aren't implemented that
way for sound historical reasons.  I think it would be nice if they were, but
they aren't.
tty_slaves really need to be devices with device drivers so that they can
utilise information from devicetree.

line disciplines do not and cannot know about any hardware other than the
standard UART.  tty_slaves exist so that they can know about regulators and
GPIOs and anything else that might combine with the UART to control a
particular device.

So tty_slaves are really specifically for devices which present a tty, but
have more hardware controls than just a UART.  Anything that doesn't have
more hardware controls is probably best handled from user-space or in a line
discipline.

And if there are more hardware controls, then it is sure to be permanently
attached.

Does that make sense?  Does it allay your concerns?

Thanks,
NeilBrown

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ