All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/16] tty: TIOCSSERIAL fixes and clean ups
@ 2021-04-07 10:23 Johan Hovold
  2021-04-07 10:23 ` [PATCH 01/16] staging: fwserial: fix TIOCSSERIAL jiffies conversions Johan Hovold
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: Johan Hovold @ 2021-04-07 10:23 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Jiri Slaby, linux-staging, greybus-dev, linux-kernel, Johan Hovold

TIOCSSERIAL is a horrid, underspecified, legacy interface which for most
serial devices is only useful for setting the close_delay and
closing_wait parameters.

This series fixes up the various ways in which driver authors have
gotten the implementation wrong over the years, like, for example,
jiffies conversions, permissions checks and error handling.

The de-facto standard for error handling is to ignore any unsupported
features and immutable parameters (cf. UPF_FIXED_PORT and deprecated
ASYNC flags).

Permission checking should prevent an unprivileged user from changing
anything but the ASYNC_USR flags (and custom divisor) by returning
-EPERM.

These patches are against tty-next, but the staging ones could otherwise
go through either tree.

I'll be sending the corresponding USB fixes separately.

Johan



Johan Hovold (16):
  staging: fwserial: fix TIOCSSERIAL jiffies conversions
  staging: fwserial: fix TIOCSSERIAL permission check
  staging: fwserial: fix TIOCSSERIAL implementation
  staging: fwserial: fix TIOCGSERIAL implementation
  staging: greybus: uart: fix TIOCSSERIAL jiffies conversions
  staging: greybus: uart: fix unprivileged TIOCCSERIAL
  staging: greybus: uart: clean up TIOCGSERIAL
  tty: amiserial: fix TIOCSSERIAL permission check
  tty: amiserial: add missing TIOCSSERIAL jiffies conversions
  tty: moxa: fix TIOCSSERIAL jiffies conversions
  tty: moxa: fix TIOCSSERIAL permission check
  tty: moxa: fix TIOCSSERIAL implementation
  tty: mxser: fix TIOCSSERIAL jiffies conversions
  tty: mxser: fix TIOCSSERIAL permission check
  pcmcia: synclink_cs: drop redundant tty-port initialisation
  tty: synclink_gt: drop redundant tty-port initialisation

 drivers/char/pcmcia/synclink_cs.c   |  2 --
 drivers/staging/fwserial/fwserial.c | 19 +++++++++---------
 drivers/staging/greybus/uart.c      | 16 +++++++--------
 drivers/tty/amiserial.c             | 25 +++++++++++++++++------
 drivers/tty/moxa.c                  | 21 +++++++++----------
 drivers/tty/mxser.c                 | 31 ++++++++++++++++++++---------
 drivers/tty/synclink_gt.c           |  2 --
 7 files changed, 68 insertions(+), 48 deletions(-)

-- 
2.26.3


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-04-07 15:23 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 10:23 [PATCH 00/16] tty: TIOCSSERIAL fixes and clean ups Johan Hovold
2021-04-07 10:23 ` [PATCH 01/16] staging: fwserial: fix TIOCSSERIAL jiffies conversions Johan Hovold
2021-04-07 10:23 ` [PATCH 02/16] staging: fwserial: fix TIOCSSERIAL permission check Johan Hovold
2021-04-07 10:23 ` [PATCH 03/16] staging: fwserial: fix TIOCSSERIAL implementation Johan Hovold
2021-04-07 10:23 ` [PATCH 04/16] staging: fwserial: fix TIOCGSERIAL implementation Johan Hovold
2021-04-07 10:23 ` [PATCH 05/16] staging: greybus: uart: fix TIOCSSERIAL jiffies conversions Johan Hovold
2021-04-07 10:23 ` [PATCH 06/16] staging: greybus: uart: fix unprivileged TIOCCSERIAL Johan Hovold
2021-04-07 10:23 ` [PATCH 07/16] staging: greybus: uart: clean up TIOCGSERIAL Johan Hovold
2021-04-07 10:23 ` [PATCH 08/16] tty: amiserial: fix TIOCSSERIAL permission check Johan Hovold
2021-04-07 10:23 ` [PATCH 09/16] tty: amiserial: add missing TIOCSSERIAL jiffies conversions Johan Hovold
2021-04-07 10:23 ` [PATCH 10/16] tty: moxa: fix " Johan Hovold
2021-04-07 10:23 ` [PATCH 11/16] tty: moxa: fix TIOCSSERIAL permission check Johan Hovold
2021-04-07 10:23 ` [PATCH 12/16] tty: moxa: fix TIOCSSERIAL implementation Johan Hovold
2021-04-07 10:23 ` [PATCH 13/16] tty: mxser: fix TIOCSSERIAL jiffies conversions Johan Hovold
2021-04-07 10:23 ` [PATCH 14/16] tty: mxser: fix TIOCSSERIAL permission check Johan Hovold
2021-04-07 10:23 ` [PATCH 15/16] pcmcia: synclink_cs: drop redundant tty-port initialisation Johan Hovold
2021-04-07 10:23 ` [PATCH 16/16] tty: synclink_gt: " Johan Hovold
2021-04-07 15:22 ` [PATCH 00/16] tty: TIOCSSERIAL fixes and clean ups Greg Kroah-Hartman

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.