<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/linux/tty.h, branch v4.6.3</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v4.6.3</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v4.6.3'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2016-06-01T19:18:03+00:00</updated>
<entry>
<title>Fix OpenSSH pty regression on close</title>
<updated>2016-06-01T19:18:03+00:00</updated>
<author>
<name>Brian Bloniarz</name>
<email>brian.bloniarz@gmail.com</email>
</author>
<published>2016-03-06T21:16:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0412bb0f42f6b3c31cd13d262a5143e0dc3445e2'/>
<id>urn:sha1:0412bb0f42f6b3c31cd13d262a5143e0dc3445e2</id>
<content type='text'>
commit 0f40fbbcc34e093255a2b2d70b6b0fb48c3f39aa upstream.

OpenSSH expects the (non-blocking) read() of pty master to return
EAGAIN only if it has received all of the slave-side output after
it has received SIGCHLD. This used to work on pre-3.12 kernels.

This fix effectively forces non-blocking read() and poll() to
block for parallel i/o to complete for all ttys. It also unwinds
these changes:

1) f8747d4a466ab2cafe56112c51b3379f9fdb7a12
   tty: Fix pty master read() after slave closes

2) 52bce7f8d4fc633c9a9d0646eef58ba6ae9a3b73
   pty, n_tty: Simplify input processing on final close

3) 1a48632ffed61352a7810ce089dc5a8bcd505a60
   pty: Fix input race when closing

Inspired by analysis and patch from Marc Aurele La France &lt;tsi@tuyoix.net&gt;

Reported-by: Volth &lt;openssh@volth.com&gt;
Reported-by: Marc Aurele La France &lt;tsi@tuyoix.net&gt;
BugLink: https://bugzilla.mindrot.org/show_bug.cgi?id=52
BugLink: https://bugzilla.mindrot.org/show_bug.cgi?id=2492
Signed-off-by: Brian Bloniarz &lt;brian.bloniarz@gmail.com&gt;
Reviewed-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: Unify receive_buf() code paths</title>
<updated>2016-01-28T22:13:44+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-11T04:36:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8d082cd300ab422b7ee9f4629a1c470e4f0d90d5'/>
<id>urn:sha1:8d082cd300ab422b7ee9f4629a1c470e4f0d90d5</id>
<content type='text'>
Instead of two distinct code branches for receive_buf() handling,
use tty_ldisc_receive_buf() as the single code path.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Fix GPF in flush_to_ldisc(), part 2</title>
<updated>2016-01-28T22:13:44+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-11T04:36:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=f33798deecbd59a2955f40ac0ae2bc7dff54c069'/>
<id>urn:sha1:f33798deecbd59a2955f40ac0ae2bc7dff54c069</id>
<content type='text'>
commit 9ce119f318ba ("tty: Fix GPF in flush_to_ldisc()") fixed a
GPF caused by a line discipline which does not define a receive_buf()
method.

However, the vt driver (and speakup driver also) pushes selection
data directly to the line discipline receive_buf() method via
tty_ldisc_receive_buf(). Fix the same problem in tty_ldisc_receive_buf().

Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: audit: Combine push functions</title>
<updated>2016-01-28T00:41:04+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T06:55:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=37282a77954aa2dbb339d15902290f25b868d2e8'/>
<id>urn:sha1:37282a77954aa2dbb339d15902290f25b868d2e8</id>
<content type='text'>
tty_audit_push() and tty_audit_push_current() perform identical
tasks; eliminate the tty_audit_push() implementation and the
tty_audit_push_current() name.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: audit: Ignore current association for audit push</title>
<updated>2016-01-28T00:41:04+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T06:55:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b50819f437c094b4beb2e8684fbe12bbe79fb331'/>
<id>urn:sha1:b50819f437c094b4beb2e8684fbe12bbe79fb331</id>
<content type='text'>
In canonical read mode, each line read and logged is pushed separately
with tty_audit_push(). For all single-threaded processes and multi-threaded
processes reading from only one tty, this patch has no effect; the last line
read will still be the entry pushed to the audit log because the tty
association cannot have changed between tty_audit_add_data() and
tty_audit_push().

For multi-threaded processes reading from different ttys concurrently,
the audit log will have mixed log entries anyway. Consider two ttys
audited concurrently:

CPU0                           CPU1
----------                     ------------
tty_audit_add_data(ttyA)
                               tty_audit_add_data(ttyB)
tty_audit_push()
                               tty_audit_add_data(ttyB)
                               tty_audit_push()

This patch will now cause the ttyB output to be split into separate
audit log entries.

However, this possibility is equally likely without this patch:

CPU0                           CPU1
----------                     ------------
                               tty_audit_add_data(ttyB)
tty_audit_add_data(ttyA)
tty_audit_push()
                               tty_audit_add_data(ttyB)
                               tty_audit_push()

Mixed canonical and non-canonical reads have similar races.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: audit: Remove icanon mode from call chain</title>
<updated>2016-01-28T00:41:04+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T06:55:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=309426ae69cdf35b0d72a8bd59a5081f8ddccddd'/>
<id>urn:sha1:309426ae69cdf35b0d72a8bd59a5081f8ddccddd</id>
<content type='text'>
The tty termios bits cannot change while n_tty_read() is in the
i/o loop; the termios_rwsem ensures mutual exclusion with termios
changes in n_tty_set_termios(). Check L_ICANON() directly and
eliminate icanon parameter.

NB: tty_audit_add_data() =&gt; tty_audit_buf_get() =&gt; tty_audit_buf_alloc()
is a single path; ie., tty_audit_buf_get() and tty_audit_buf_alloc()
have no other callers.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Make tty_files_lock per-tty</title>
<updated>2016-01-27T23:13:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T05:35:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4a510969374ab8853451c337e43d28fb864e43fd'/>
<id>urn:sha1:4a510969374ab8853451c337e43d28fb864e43fd</id>
<content type='text'>
Access to tty-&gt;tty_files list is always per-tty, never for all ttys
simultaneously. Replace global tty_files_lock spinlock with per-tty
-&gt;files_lock. Initialize when the -&gt;tty_files list is inited, in
alloc_tty_struct().

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Remove unreferenced tty flags macro TTY_DEBUG</title>
<updated>2016-01-27T23:13:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T05:35:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=527ffc11e1c0aa049b3a831d6f07ed98e06a0819'/>
<id>urn:sha1:527ffc11e1c0aa049b3a831d6f07ed98e06a0819</id>
<content type='text'>
The TTY_DEBUG macro is not used; remove.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Move tty_check_change() helper</title>
<updated>2016-01-27T23:13:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T05:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e802ca0e1892865acdde90f1aaed37333c5660c2'/>
<id>urn:sha1:e802ca0e1892865acdde90f1aaed37333c5660c2</id>
<content type='text'>
Move is_ignored() to drivers/tty/tty_io.c and re-declare in file
scope.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Remove declarations to non-existent functions</title>
<updated>2016-01-27T23:13:28+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-01-10T05:35:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=de5583d670a8b10f157fdcc7afaddfd1ec423a69'/>
<id>urn:sha1:de5583d670a8b10f157fdcc7afaddfd1ec423a69</id>
<content type='text'>
tty_read_raw_data() and tty_signal() no longer exist; remove
declarations.

Signed-off-by: Peter Hurley &lt;peter@hurleysoftware.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
