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]
Date:	Thu, 15 Mar 2012 10:08:12 +0000
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	"Tu, Xiaobing" <xiaobing.tu@...el.com>
Cc:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
	"Zhang, Yanmin" <yanmin.zhang@...el.com>,
	"Du, Alek" <alek.du@...el.com>, "Zuo, Jiao" <jiao.zuo@...el.com>
Subject: Re: [PATCH] tty: hold lock across tty buffer finding and buffer
 filling

On Thu, 15 Mar 2012 02:06:43 +0000
"Tu, Xiaobing" <xiaobing.tu@...el.com> wrote:

> From: Xiaobing Tu <xiaobing.tu@...el.com>
> 
> tty_buffer_request_room is well protected, but while after it returns,
>  it releases the port->lock. tty->buf.tail might be modified

This can only occur in a way that matters if you have multiple writers to
the tty buffer. 

It is a design requirement of the tty layer that your input is single
threaded paths and this is true for existing drivers. There is a good
reason it is true as well - ordering of bytes is defined for serial data,
any parallel writer breaks that ordering even if you have locks in
tty_insert_flip_*.

In practice that means that the tail pointer has a single incrementer and
the reader is the ldisc processing queue. 

So NAK pending a lot more explanation and an actual case where you can
show it is required.

Under what situations with what in tree driver do you see a problem ?


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