<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty, branch v3.4.55</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/tty?h=v3.4.55</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/tty?h=v3.4.55'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2013-07-13T18:03:41Z</updated>
<entry>
<title>Revert "serial: 8250_pci: add support for another kind of NetMos Technology PCI 9835 Multi-I/O Controller"</title>
<updated>2013-07-13T18:03:41Z</updated>
<author>
<name>Greg Kroah-Hartman</name>
<email>gregkh@linuxfoundation.org</email>
</author>
<published>2013-06-30T16:03:06Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6d2698aa29a15559b89c54b86523632ea4110b6c'/>
<id>urn:sha1:6d2698aa29a15559b89c54b86523632ea4110b6c</id>
<content type='text'>
commit 828c6a102b1f2b8583fadc0e779c46b31d448f0b upstream.

This reverts commit 8d2f8cd424ca0b99001f3ff4f5db87c4e525f366.

As reported by Stefan, this device already works with the parport_serial
driver, so the 8250_pci driver should not also try to grab it as well.

Reported-by: Stefan Seyfried &lt;stefan.seyfried@googlemail.com&gt;
Cc: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>pch_uart: fix a deadlock when pch_uart as console</title>
<updated>2013-07-03T17:59:05Z</updated>
<author>
<name>Liang Li</name>
<email>liang.li@windriver.com</email>
</author>
<published>2013-01-19T09:52:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5d2a2c717306c11672aef8ca6a1535ff78f57fa8'/>
<id>urn:sha1:5d2a2c717306c11672aef8ca6a1535ff78f57fa8</id>
<content type='text'>
commit 384e301e3519599b000c1a2ecd938b533fc15d85 upstream.

When we use pch_uart as system console like 'console=ttyPCH0,115200',
then 'send break' to it. We'll encounter the deadlock on a cpu/core,
with interrupts disabled on the core. When we happen to have all irqs
affinity to cpu0 then the deadlock on cpu0 actually deadlock whole
system.

In pch_uart_interrupt, we have spin_lock_irqsave(&amp;priv-&gt;lock, flags)
then call pch_uart_err_ir when break is received. Then the call to
dev_err would actually call to pch_console_write then we'll run into
another spin_lock(&amp;priv-&gt;lock), with interrupts disabled.

So in the call sequence lead by pch_uart_interrupt, we should be
carefully to call functions that will 'print message to console' only
in case the uart port is not being used as serial console.

Signed-off-by: Liang Li &lt;liang.li@windriver.com&gt;
Cc: Yijing Wang &lt;wangyijing@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: Fix tty miss restart after we turn off flow-control</title>
<updated>2013-06-07T19:49:11Z</updated>
<author>
<name>Wang YanQing</name>
<email>udknight@gmail.com</email>
</author>
<published>2013-05-09T06:16:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=893f9ef045f5b8eee088489be7177859e74b690d'/>
<id>urn:sha1:893f9ef045f5b8eee088489be7177859e74b690d</id>
<content type='text'>
commit dab73b4eb9ef924a2b90dab84e539076d82b256f upstream.

I meet emacs hang in start if I do the operation below:
  1: echo 3 &gt; /proc/sys/vm/drop_caches
  2: emacs BigFile
  3: Press CTRL-S follow 2 immediately

Then emacs hang on, CTRL-Q can't resume, the terminal
hang on, you can do nothing with this terminal except
close it.

The reason is before emacs takeover control the tty,
we use CTRL-S to XOFF it. Then when emacs takeover the
control, it may don't use the flow-control, so emacs hang.
This patch fix it.

This patch will fix a kind of strange tty relation hang problem,
I believe I meet it with vim in ssh, and also see below bug report:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=465823

Signed-off-by: Wang YanQing &lt;udknight@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: fix up atime/mtime mess, take three</title>
<updated>2013-05-08T02:51:53Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2013-05-01T14:32:21Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ce5b62fd947369813666074f725aa0c1d819fc29'/>
<id>urn:sha1:ce5b62fd947369813666074f725aa0c1d819fc29</id>
<content type='text'>
commit b0b885657b6c8ef63a46bc9299b2a7715d19acde upstream.

We first tried to avoid updating atime/mtime entirely (commit
b0de59b5733d: "TTY: do not update atime/mtime on read/write"), and then
limited it to only update it occasionally (commit 37b7f3c76595: "TTY:
fix atime/mtime regression"), but it turns out that this was both
insufficient and overkill.

It was insufficient because we let people attach to the shared ptmx node
to see activity without even reading atime/mtime, and it was overkill
because the "only once a minute" means that you can't really tell an
idle person from an active one with 'w'.

So this tries to fix the problem properly.  It marks the shared ptmx
node as un-notifiable, and it lowers the "only once a minute" to a few
seconds instead - still long enough that you can't time individual
keystrokes, but short enough that you can tell whether somebody is
active or not.

Reported-by: Simon Kirby &lt;sim@hostway.ca&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>serial_core.c: add put_device() after device_find_child()</title>
<updated>2013-05-08T02:51:53Z</updated>
<author>
<name>Federico Vaga</name>
<email>federico.vaga@gmail.com</email>
</author>
<published>2013-04-15T14:01:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=be2300f0961d43c4d92f2a7aa716811383ebbeb2'/>
<id>urn:sha1:be2300f0961d43c4d92f2a7aa716811383ebbeb2</id>
<content type='text'>
commit 5a65dcc04cda41f4122aacc37a5a348454645399 upstream.

The serial core uses device_find_child() but does not drop the reference to
the retrieved child after using it. This patch add the missing put_device().

What I have done to test this issue.

I used a machine with an AMBA PL011 serial driver. I tested the patch on
next-20120408 because the last branch [next-20120415] does not boot on this
board.

For test purpose, I added some pr_info() messages to print the refcount
after device_find_child() (lines: 1937,2009), and after put_device()
(lines: 1947, 2021).

Boot the machine *without* put_device(). Then:

echo reboot &gt; /sys/power/disk
echo disk &gt; /sys/power/state
[   87.058575] uart_suspend_port:1937 refcount 4
[   87.058582] uart_suspend_port:1947 refcount 4
[   87.098083] uart_resume_port:2009refcount 5
[   87.098088] uart_resume_port:2021 refcount 5

echo disk &gt; /sys/power/state
[  103.055574] uart_suspend_port:1937 refcount 6
[  103.055580] uart_suspend_port:1947 refcount 6
[  103.095322] uart_resume_port:2009 refcount 7
[  103.095327] uart_resume_port:2021 refcount 7

echo disk &gt; /sys/power/state
[  252.459580] uart_suspend_port:1937 refcount 8
[  252.459586] uart_suspend_port:1947 refcount 8
[  252.499611] uart_resume_port:2009 refcount 9
[  252.499616] uart_resume_port:2021 refcount 9

The refcount continuously increased.

Boot the machine *with* this patch. Then:

echo reboot &gt; /sys/power/disk
echo disk &gt; /sys/power/state
[  159.333559] uart_suspend_port:1937 refcount 4
[  159.333566] uart_suspend_port:1947 refcount 3
[  159.372751] uart_resume_port:2009 refcount 4
[  159.372755] uart_resume_port:2021 refcount 3

echo disk &gt; /sys/power/state
[  185.713614] uart_suspend_port:1937 refcount 4
[  185.713621] uart_suspend_port:1947 refcount 3
[  185.752935] uart_resume_port:2009 refcount 4
[  185.752940] uart_resume_port:2021 refcount 3

echo disk &gt; /sys/power/state
[  207.458584] uart_suspend_port:1937 refcount 4
[  207.458591] uart_suspend_port:1947 refcount 3
[  207.498598] uart_resume_port:2009 refcount 4
[  207.498605] uart_resume_port:2021 refcount 3

The refcount correctly handled.

Signed-off-by: Federico Vaga &lt;federico.vaga@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: fix atime/mtime regression</title>
<updated>2013-05-01T16:41:03Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-04-26T11:48:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c61642cce0247175489666d90ebd59f8a04e7c76'/>
<id>urn:sha1:c61642cce0247175489666d90ebd59f8a04e7c76</id>
<content type='text'>
commit 37b7f3c76595e23257f61bd80b223de8658617ee upstream.

In commit b0de59b5733d ("TTY: do not update atime/mtime on read/write")
we removed timestamps from tty inodes to fix a security issue and waited
if something breaks.  Well, 'w', the utility to find out logged users
and their inactivity time broke.  It shows that users are inactive since
the time they logged in.

To revert to the old behaviour while still preventing attackers to
guess the password length, we update the timestamps in one-minute
intervals by this patch.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>TTY: do not update atime/mtime on read/write</title>
<updated>2013-05-01T16:41:03Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2013-02-15T14:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=3ab8db7b9c2e0a399e65a95999e0794a85c63975'/>
<id>urn:sha1:3ab8db7b9c2e0a399e65a95999e0794a85c63975</id>
<content type='text'>
commit b0de59b5733d18b0d1974a060860a8b5c1b36a2e upstream.

On http://vladz.devzero.fr/013_ptmx-timing.php, we can see how to find
out length of a password using timestamps of /dev/ptmx. It is
documented in "Timing Analysis of Keystrokes and Timing Attacks on
SSH". To avoid that problem, do not update time when reading
from/writing to a TTY.

I am afraid of regressions as this is a behavior we have since 0.97
and apps may expect the time to be current, e.g. for monitoring
whether there was a change on the TTY. Now, there is no change. So
this would better have a lot of testing before it goes upstream.

References: CVE-2013-0160

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>vt: synchronize_rcu() under spinlock is not nice...</title>
<updated>2013-04-05T17:04:19Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2013-03-27T00:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=86302600f82d715647154e18a96245642f1bf71e'/>
<id>urn:sha1:86302600f82d715647154e18a96245642f1bf71e</id>
<content type='text'>
commit e8cd81693bbbb15db57d3c9aa7dd90eda4842874 upstream.

vcs_poll_data_free() calls unregister_vt_notifier(), which calls
atomic_notifier_chain_unregister(), which calls synchronize_rcu().
Do it *after* we'd dropped -&gt;f_lock.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: atmel_serial_probe(): index of atmel_ports[] fix</title>
<updated>2013-04-05T17:04:18Z</updated>
<author>
<name>Pawel Wieczorkiewicz</name>
<email>wpawel@gmail.com</email>
</author>
<published>2013-02-20T16:26:20Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d32cdd3f703100a028276ac9a6afb848a203906e'/>
<id>urn:sha1:d32cdd3f703100a028276ac9a6afb848a203906e</id>
<content type='text'>
commit 503bded92da283b2f31d87e054c4c6d30c3c2340 upstream.

Index of atmel_ports[ATMEL_MAX_UART] should be smaller
than ATMEL_MAX_UART.

Signed-off-by: Pawel Wieczorkiewicz &lt;wpawel@gmail.com&gt;
Acked-by: Nicolas Ferre &lt;nicolas.ferre@atmel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>sunsu: Fix panic in case of nonexistent port at "console=ttySY" cmdline option</title>
<updated>2013-03-28T19:11:52Z</updated>
<author>
<name>Tkhai Kirill</name>
<email>tkhai@yandex.ru</email>
</author>
<published>2013-02-23T23:01:15Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=1c93c2e727a02efe7e143c6d6798facbab31d9e1'/>
<id>urn:sha1:1c93c2e727a02efe7e143c6d6798facbab31d9e1</id>
<content type='text'>
[ Upstream commit cb29529ea0030e60ef1bbbf8399a43d397a51526 ]

If a machine has X (X &lt; 4) sunsu ports and cmdline
option "console=ttySY" is passed, where X &lt; Y &lt;= 4,
than the following panic happens:

Unable to handle kernel NULL pointer dereference
TPC: &lt;sunsu_console_setup+0x78/0xe0&gt;
RPC: &lt;sunsu_console_setup+0x74/0xe0&gt;
I7: &lt;register_console+0x378/0x3e0&gt;
Call Trace:
 [0000000000453a38] register_console+0x378/0x3e0
 [0000000000576fa0] uart_add_one_port+0x2e0/0x340
 [000000000057af40] su_probe+0x160/0x2e0
 [00000000005b8a4c] platform_drv_probe+0xc/0x20
 [00000000005b6c2c] driver_probe_device+0x12c/0x220
 [00000000005b6da8] __driver_attach+0x88/0xa0
 [00000000005b4df4] bus_for_each_dev+0x54/0xa0
 [00000000005b5a54] bus_add_driver+0x154/0x260
 [00000000005b7190] driver_register+0x50/0x180
 [00000000006d250c] sunsu_init+0x18c/0x1e0
 [00000000006c2668] do_one_initcall+0xe8/0x160
 [00000000006c282c] kernel_init_freeable+0x12c/0x1e0
 [0000000000603764] kernel_init+0x4/0x100
 [0000000000405f64] ret_from_syscall+0x1c/0x2c
 [0000000000000000]           (null)

1)Fix the panic;
2)Increment registered port number every successful
probe.

Signed-off-by: Kirill Tkhai &lt;tkhai@yandex.ru&gt;
CC: David Miller &lt;davem@davemloft.net&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
