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: <20110110131332.622e8a0d@lxorguk.ukuu.org.uk>
Date:	Mon, 10 Jan 2011 13:13:32 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Rodolfo Giometti <giometti@...ux.it>
Cc:	linux-kernel@...r.kernel.org, Russell Coker <russell@...er.com.au>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Randy Dunlap <randy.dunlap@...cle.com>
Subject: Re: [PATCH 1/1] char nvtty: Network Virtual Terminal support

> By using these devices and a proper compatible server (not included
> here but you can use sredird) you can get access to a remote tty
> device as the tty device itself was conneted with your local host.
> All data and settings are sent and received through the network.

And this is still something that should be done in userspace if necessary
by fixing up the tty layer to support pty/tty pair modem lines and
termios change reporting, or some kind of *generic* vt that can also
expose all the config other net protocols might need.

> +	default:
> +		tty->termios->c_cflag = B0;

This btw is wrong - if you don't recognize the baud rate you want to
force a new one. Also you shouldn't be writing all of c_cflag here just
the baud bits, also you shouldn't in fact ever be hand mangling the baud
bits but using the helpers.


> +	}
> +}
> +#undef TEST_SET_BAUDRATE
> +
> +#define TEST_SET_DATASIZE(b)	case b: tty->termios->c_cflag |= CS ## b ; break
> +static void nvtty_set_datasize(struct nvtty_serial *info, unsigned int datasize)
> +{
> +	struct tty_struct *tty = info->tty;
> +
> +	nvtty_dbg(info, "datasize=%d", datasize);
> +
> +	tty->termios->c_cflag &= ~CSIZE;
> +	switch (datasize) {
> +	TEST_SET_DATASIZE(5);
> +	TEST_SET_DATASIZE(6);
> +	TEST_SET_DATASIZE(7);
> +	TEST_SET_DATASIZE(8);
> +	default:
> +		tty->termios->c_cflag = CS5;

Should be |=
>

> +static void nvtty_set_parity(struct nvtty_serial *info, unsigned int parity)
> +{
> +	struct tty_struct *tty = info->tty;
> +
> +	nvtty_dbg(info, "parity=%d", parity);
> +
> +	tty->termios->c_cflag &= ~(PARENB | PARODD);

Needs to consider the CMSPAR bit.

Otherwise its a very nice implementation of something I don't think we
should have implemented in the kernel.
--
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