linux-brain/arch/alpha
H. Peter Anvin (Intel) d2db9e2ee1 arch/alpha, termios: implement BOTHER, IBSHIFT and termios2
commit d0ffb805b7 upstream.

Alpha has had c_ispeed and c_ospeed, but still set speeds in c_cflags
using arbitrary flags. Because BOTHER is not defined, the general
Linux code doesn't allow setting arbitrary baud rates, and because
CBAUDEX == 0, we can have an array overrun of the baud_rate[] table in
drivers/tty/tty_baudrate.c if (c_cflags & CBAUD) == 037.

Resolve both problems by #defining BOTHER to 037 on Alpha.

However, userspace still needs to know if setting BOTHER is actually
safe given legacy kernels (does anyone actually care about that on
Alpha anymore?), so enable the TCGETS2/TCSETS*2 ioctls on Alpha, even
though they use the same structure. Define struct termios2 just for
compatibility; it is the exact same structure as struct termios. In a
future patchset, this will be cleaned up so the uapi headers are
usable from libc.

Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Cc: Jiri Slaby <jslaby@suse.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Kate Stewart <kstewart@linuxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Cc: Eugene Syromiatnikov <esyr@redhat.com>
Cc: <linux-alpha@vger.kernel.org>
Cc: <linux-serial@vger.kernel.org>
Cc: Johan Hovold <johan@kernel.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-21 09:27:42 +01:00
..
boot alpha: Fix bootpfile and bootpzfile make targets 2015-05-26 10:01:50 -07:00
include arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 2018-11-21 09:27:42 +01:00
kernel sys: don't hold uts_sem while accessing userspace memory 2018-09-09 20:04:35 +02:00
lib alpha: lib: export __delay 2015-09-17 21:16:07 -07:00
math-emu alpha: change to new Makefile flag variables 2011-01-17 05:42:13 +01:00
mm mm/fault, arch: Use pagefault_disable() to check for disabled pagefaults in the handler 2015-05-19 08:39:15 +02:00
oprofile alpha: delete non-required instances of <linux/init.h> 2015-05-26 10:01:48 -07:00
defconfig defconfig reduction 2010-08-14 22:26:53 +02:00
Kconfig alpha: select CONFIG_ARCH_USE_CMPXCHG_LOCKREF. 2015-08-30 18:01:16 -07:00
Kconfig.debug alpha/parisc: remove config variable DEBUG_RWLOCK 2008-02-06 10:41:03 -08:00
Makefile alpha: makefile: don't enforce small data model for kernel builds 2013-04-07 12:59:30 -07:00