[lkml]   [2018]   [Sep]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCHES] tty ioctls cleanups, compat and not only
On Thu, Sep 13, 2018 at 10:31 PM Al Viro <> wrote:
> On Thu, Sep 13, 2018 at 01:19:42PM +0200, Arnd Bergmann wrote:
> > On Thu, Sep 13, 2018 at 4:31 AM Al Viro <> wrote:
> > * TIOCSERGWILD/TIOCSERSWILD are obsolete and never do
> > anything useful, but the return code is inconsistent: ENOTTY
> > in compat mode vs 0 in uart_ioctl, plus a printk for amiserial.
> > If we want to keep it around rather than deleting it completely,
> > it should be marked as compatible.
> Yes. Not sure if we want to - the only user is setserial(8), with
> -W Do wild interrupt initialization and exit. This option is no
> longer relevant in Linux kernels after version 2.1.
> What's more, rc.serial does *not* use it since 2.15 and even in 2.14 it wouldn't
> have failed the boot - just whine (truthfully) "Cannot scan for wild interrupts"
> on stderr and continue with the rest of the script. The same goes at least as
> far back as setserial-2.02. That's what MCC had; if you want to check something
> earlier, you'll probably have to ask tytso, but I very much doubt that anything
> of that vintage will work with the current kernels *or* that anyone cared to
> abort the script in question on setserial -W /dev/cua0 failing to start with.
> So I'd seriously suggest removing those altogether. I mean, sure, we can carry
> explicit "obsolete, quietly return 0 on those" indefinitely, but that really feels
> over the top. Time to bury the body, unless somebody objects...

Sounds good to me.

> > * PPPIOCGCHAN/PPPIOCGUNIT are implemented by multiple
> > ldisc variants, marking them as compatible would save us from
> > implementing a comp_ioctl method for each one separately.
> > These are also used on some things that are not ttys though,
> > so we can't remove them from fs/compat_ioctl.c yet.
> Worse - there's ipwireless, which implements it in tty_operations ->ioctl().

Yes, I saw that too, but couldn't figure out exactly what ipwireless
does. I suppose it is some serial port driver that comes with a
hardcoded ppp implementation instead of a switchable ldisc?

> > SIOCSOUTFILL, and SIOCGOUTFILL are in the tty_ioctl
> > functions for multiple protocol handlers, comparable to
> > the PPP ones.
> Very definitely shared with sockets, and I prefer to handle the tty-side cases
> in ldisc ->compat_ioctl().

Fair enough.


 \ /
  Last update: 2018-09-13 22:57    [W:0.100 / U:12.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site