lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sun, 25 Mar 2012 22:06:10 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	Richard Weinberger <richard@....at>, Jiri Slaby <jslaby@...e.cz>,
	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	Jiri Slaby <jirislaby@...il.com>
Subject: Re: TTY: tty_port questions

On Sun, 25 Mar 2012 19:31:14 +0100
Al Viro <viro@...IV.linux.org.uk> wrote:

> How is tty_port supposed to work wrt hotplug?  I.e. are those guys (OK,
> the structures they are embedded into) supposed to live as long as
> tty_driver lives?  AFAICS, for serial we have an extra layer atop of
> those guys (uart_port) and that's where removals seem to act, but there
> seems to be more to it...

Serial had pre-exising gunge not all of which has been cleaned, just as
it still has its own buffers that want to be using kfifo.

Best examples are probably USB serial and neatest may well be the sdio
serial card driver.

> Suppose we handle uml reconfig requests as port removal + port addition;
> what's needed to make sure that port is out of use and we can play with
> it without stepping on anyone's toes?  Something along the lines of what
> uart_remove_one_port() is doing?  I.e. tty_unregister_device() + tty_vhangup()?
> But serial_core seems to be open-coding tty_port_open() for some reason
> and _there_ we have port->count updates under port->mutex, so the
> situation might be different...

If you are creating/removing physical ports (or fake physical ports) you
probably need to be refcounting them too.

Alan

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ