All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Cc: "H. Peter Anvin (Intel)" <hpa@zytor.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Al Viro <viro@zeniv.linux.org.uk>,
	Richard Henderson <rth@twiddle.net>,
	Ivan Kokshaysky <ink@jurassic.park.msu.ru>,
	Matt Turner <mattst88@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	Philippe Ombredanne <pombredanne@nexb.com>,
	Eugene Syromiatnikov <esyr@redhat.com>,
	linux-alpha@vger.kernel.org, linux-serial@vger.kernel.org,
	Johan Hovold <johan@kernel.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	stable@vger.kernel.org
Subject: [PATCH stable 0/2] termios: Alpha BOTHER/IBSHIFT, tty_baudrate fix
Date: Sat,  6 Oct 2018 20:37:46 -0700	[thread overview]
Message-ID: <20181007033748.224461-1-hpa@zytor.com> (raw)

From: "H. Peter Anvin (Intel)" <hpa@zytor.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@zytor.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: <stable@vger.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(-)

             reply	other threads:[~2018-10-07  3:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-07  3:37 H. Peter Anvin [this message]
2018-10-07  3:37 ` [PATCH stable 1/2] arch/alpha, termios: implement BOTHER, IBSHIFT and termios2 H. Peter Anvin
2018-10-07  3:37 ` [PATCH stable 2/2] termios, tty/tty_baudrate.c: simplify, auto-generate baud table H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181007033748.224461-1-hpa@zytor.com \
    --to=hpa@zytor.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=benh@kernel.crashing.org \
    --cc=esyr@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ink@jurassic.park.msu.ru \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mattst88@gmail.com \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.org \
    --cc=pombredanne@nexb.com \
    --cc=rth@twiddle.net \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.