Skip to content

tty: TIOCSSERIAL fixes and clean ups

Johan Hovold linux-staging lkml stable 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16staging: fwserial: fix TIOCSSERIAL jiffies conversionsdrivers/staging/fwserial/fwserial.c+2 -20 replies
2/16staging: fwserial: fix TIOCSSERIAL permission checkdrivers/staging/fwserial/fwserial.c+6 -20 replies
3/16staging: fwserial: fix TIOCSSERIAL implementationdrivers/staging/fwserial/fwserial.c+0 -40 replies
4/16staging: fwserial: fix TIOCGSERIAL implementationdrivers/staging/fwserial/fwserial.c+3 -40 replies
5/16staging: greybus: uart: fix TIOCSSERIAL jiffies conversionsdrivers/staging/greybus/uart.c+7 -40 replies
6/16staging: greybus: uart: fix unprivileged TIOCCSERIALdrivers/staging/greybus/uart.c+0 -20 replies
7/16staging: greybus: uart: clean up TIOCGSERIALdrivers/staging/greybus/uart.c+0 -30 replies
8/16tty: amiserial: fix TIOCSSERIAL permission checkdrivers/tty/amiserial.c+1 -00 replies
9/16tty: amiserial: add missing TIOCSSERIAL jiffies conversionsdrivers/tty/amiserial.c+19 -70 replies
10/16tty: moxa: fix TIOCSSERIAL jiffies conversionsdrivers/tty/moxa.c+2 -20 replies
11/16tty: moxa: fix TIOCSSERIAL permission checkdrivers/tty/moxa.c+11 -50 replies
12/16tty: moxa: fix TIOCSSERIAL implementationdrivers/tty/moxa.c+0 -50 replies
13/16tty: mxser: fix TIOCSSERIAL jiffies conversionsdrivers/tty/mxser.c+18 -60 replies
14/16tty: mxser: fix TIOCSSERIAL permission checkdrivers/tty/mxser.c+4 -30 replies
15/16pcmcia: synclink_cs: drop redundant tty-port initialisationdrivers/char/pcmcia/synclink_cs.c+0 -20 replies
16/16tty: synclink_gt: drop redundant tty-port initialisationdrivers/tty/synclink_gt.c+0 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/16] tty: TIOCSSERIAL fixes and clean ups

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(-)
Signature · 1 line
2.26.3