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:	Fri, 25 Aug 2006 16:39:29 -0400
From:	Theodore Tso <tytso@....edu>
To:	Stuart MacDonald <stuartm@...necttech.com>,
	'Alan Cox' <alan@...rguk.ukuu.org.uk>,
	'Krzysztof Halasa' <khc@...waw.pl>,
	linux-serial@...r.kernel.org,
	'LKML' <linux-kernel@...r.kernel.org>,
	libc-alpha@...rces.redhat.com
Subject: Re: Serial custom speed deprecated?

On Fri, Aug 25, 2006 at 08:32:03PM +0100, Russell King wrote:
> On Fri, Aug 25, 2006 at 11:21:21AM -0400, Stuart MacDonald wrote:
> > From: On Behalf Of Alan Cox
> > > We could implement an entirely new TCSETS/TCGETS/TCSETSA/SAW 
> > > which used
> > > different B* values so B9600 was 9600 etc and the data was stored in
> > 
> > I think if a numeric baud rate is going to be supported, getting away
> > from the B* cruft is important. Just use a number.
> 
> The "B* cruft" is part of POSIX so needs to be retained.  These are
> used in conjunction with with cfgetispeed(), cfgetospeed(), cfsetispeed()
> and cfsetospeed() to alter the baud rate settings in the termios
> structure in an implementation defined manner.

The B* cruft has to be maintained.

But it would be POSIX complaint for B9600 to be #defined to B9600, and
B19200 to be #defined to B19200.

What would scare me though about doing something like would be
potential for the ABI changes.  Not only do you have to worry about a
consistent set of ioctl's, structure definitions, and B* defines, but
you also have to worry about userspace libraries that use B* as part
of their interface, and expect user programs to pass B* constants to
the userspace library.  (Say, some kind of conveience dialout library,
for example.)

In that case, the application could have been compiled with the
new-style termios.h, but the userspace library could have been
compiled with the old-style termios.h, and hence the old-style ioctl
definitions, and the opportunities for mischief are endless.

					- Ted
-
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