[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181007033748.224461-1-hpa@zytor.com>
Date: Sat, 6 Oct 2018 20:37:46 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: linux-kernel@...r.kernel.org
Cc: "H. Peter Anvin (Intel)" <hpa@...or.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>,
Al Viro <viro@...iv.linux.org.uk>,
Richard Henderson <rth@...ddle.net>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matt Turner <mattst88@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Kate Stewart <kstewart@...uxfoundation.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Eugene Syromiatnikov <esyr@...hat.com>,
linux-alpha@...r.kernel.org, linux-serial@...r.kernel.org,
Johan Hovold <johan@...nel.org>,
Alan Cox <alan@...rguk.ukuu.org.uk>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>, stable@...r.kernel.org
Subject: [PATCH stable 0/2] termios: Alpha BOTHER/IBSHIFT, tty_baudrate fix
From: "H. Peter Anvin (Intel)" <hpa@...or.com>
It turns out that Alpha is the only architecture that never
implemented BOTHER and IBSHIFT, which is otherwise ages old. This is
one thing that has held up glibc support for this feature (all other
architectures have supported these for about a decade, at least before
the current 3.2 glibc cutoff.)
Furthermore, in the process of dealing with this, I discovered that
the current code in tty_baudrate.c can read past the end of the
baud_table[] on Alpha and PowerPC. The second patch in this series
fixes that, but it also cleans up the code substantially by
auto-generating the table and, since all architectures now have them,
removing all conditionals for BOTHER and IBSHIFT existing.
Tagging for stable because these are concrete problems. I have a much
bigger update in process, nearly done, which will clean up a lot of
duplicated code and make the uapi headers usable for libc, but that is
not critical on the same level.
Tested on x86, compile-tested on Alpha.
Signed-off-by: H. Peter Anvin (Intel) <hpa@...or.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>
Cc: Al Viro <viro@...iv.linux.org.uk>
Cc: Richard Henderson <rth@...ddle.net>
Cc: Ivan Kokshaysky <ink@...assic.park.msu.ru>
Cc: Matt Turner <mattst88@...il.com>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Kate Stewart <kstewart@...uxfoundation.org>
Cc: Philippe Ombredanne <pombredanne@...b.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Eugene Syromiatnikov <esyr@...hat.com>
Cc: <linux-alpha@...r.kernel.org>
Cc: <linux-serial@...r.kernel.org>
Cc: Johan Hovold <johan@...nel.org>
Cc: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Michael Ellerman <mpe@...erman.id.au>
Cc: <stable@...r.kernel.org>
---
arch/alpha/include/asm/termios.h | 8 +-
arch/alpha/include/uapi/asm/ioctls.h | 5 +
arch/alpha/include/uapi/asm/termbits.h | 17 +++
drivers/tty/.gitignore | 1 +
drivers/tty/Makefile | 16 +++
drivers/tty/bmacros.c | 2 +
drivers/tty/tty_baudrate.c | 190 +++++++++++++--------------------
7 files changed, 122 insertions(+), 117 deletions(-)
Powered by blists - more mailing lists