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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120325220907.0591f517@ultron>
Date:	Sun, 25 Mar 2012 22:09:07 +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 18:20:18 +0100
Al Viro <viro@...IV.linux.org.uk> wrote:

> On Sun, Mar 25, 2012 at 05:14:37PM +0200, Richard Weinberger wrote:
> > >> FWIW, uml console in default config is basically "start xterm for each VC".
> > >> What do you suggest to do on vhangup() on one of those?
> > > 
> > > What posix says must happen. Which is that the running processes get a
> > > hangup. So a vhangup() would ensure there were no old apps on the UML
> > > guess talking to the xterm (eg stealing login credentials, or abusing
> > > TIOCSTI etc).
> 
> IIRC, vhangup(2) is Linux-specific, so I would be surprised if POSIX had
> anything on it...

vhangup causes a carrier drop event equivalent. The rest of the behavior
is POSIX/SUSv3.

> login(1) from util-linux does vhangup(); login(1) from shadow doesn't.

Shadow assumes the getty cleans the channel I believe.

> The thing is, we don't want to do that when port is in use.  And we definitely
> don't want somebody to open the damn thing when it's halfway through getting
> set up.  I don't see any natural way to do that exclusion with tty_port -
> port->{count,block_open} is protected only by a spinlock and port setup
> we need to do is blocking...

How does this differ from a hardware hotplug ?

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