<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pm24.git/drivers/tty, branch v5.6</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.kobert.dev/pm24.git/atom?h=v5.6</id>
<link rel='self' href='https://git.kobert.dev/pm24.git/atom?h=v5.6'/>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/'/>
<updated>2020-03-18T12:15:13Z</updated>
<entry>
<title>tty: fix compat TIOCGSERIAL checking wrong function ptr</title>
<updated>2020-03-18T12:15:13Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2020-02-24T18:20:44Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=6e622cd8bd888c7fa3ee2b7dfb3514ab53b21570'/>
<id>urn:sha1:6e622cd8bd888c7fa3ee2b7dfb3514ab53b21570</id>
<content type='text'>
Commit 77654350306a ("take compat TIOC[SG]SERIAL treatment into
tty_compat_ioctl()") changed the compat version of TIOCGSERIAL to start
checking for the presence of the -&gt;set_serial function pointer rather
than -&gt;get_serial.  This appears to be a copy-and-paste error, since
-&gt;get_serial is the function pointer that is called as well as the
pointer that is checked by the non-compat version of TIOCGSERIAL.

Fix this by checking the correct function pointer.

Fixes: 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()")
Cc: &lt;stable@vger.kernel.org&gt; # v4.20+
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20200224182044.234553-3-ebiggers@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: fix compat TIOCGSERIAL leaking uninitialized memory</title>
<updated>2020-03-18T12:15:13Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2020-02-24T18:20:43Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=17329563a97df3ba474eca5037c1336e46e14ff8'/>
<id>urn:sha1:17329563a97df3ba474eca5037c1336e46e14ff8</id>
<content type='text'>
Commit 77654350306a ("take compat TIOC[SG]SERIAL treatment into
tty_compat_ioctl()") changed the compat version of TIOCGSERIAL to start
copying a whole 'serial_struct32' to userspace rather than individual
fields, but failed to initialize all padding and fields -- namely the
hole after the 'iomem_reg_shift' field, and the 'reserved' field.

Fix this by initializing the struct to zero.

[v2: use sizeof, and convert the adjacent line for consistency.]

Reported-by: syzbot+8da9175e28eadcb203ce@syzkaller.appspotmail.com
Fixes: 77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()")
Cc: &lt;stable@vger.kernel.org&gt; # v4.20+
Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20200224182044.234553-2-ebiggers@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: drop outdated comments about release_tty() locking</title>
<updated>2020-03-18T12:08:45Z</updated>
<author>
<name>Eric Biggers</name>
<email>ebiggers@google.com</email>
</author>
<published>2020-02-24T07:33:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=ed069827ca70af057caf21c395f76c2c0b82d429'/>
<id>urn:sha1:ed069827ca70af057caf21c395f76c2c0b82d429</id>
<content type='text'>
The current version of the TTY code unlocks the tty_struct(s) before
release_tty() rather than after.  Moreover, tty_unlock_pair() no longer
exists.  Thus, remove the outdated comments regarding tty_unlock_pair().

Signed-off-by: Eric Biggers &lt;ebiggers@google.com&gt;
Link: https://lore.kernel.org/r/20200224073359.292795-1-ebiggers@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: fsl_lpuart: free IDs allocated by IDA</title>
<updated>2020-03-06T13:10:44Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2020-03-03T17:42:59Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d'/>
<id>urn:sha1:2b2e71fe657510a6f71aa16ef0309fa6bc20ab3d</id>
<content type='text'>
Since commit 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node
dependence") the port line number can also be allocated by IDA, but in
case of an error the ID will no be removed again. More importantly, any
ID will be freed in remove(), even if it wasn't allocated but instead
fetched by of_alias_get_id(). If it was not allocated by IDA there will
be a warning:
  WARN(1, "ida_free called for id=%d which is not allocated.\n", id);

Move the ID allocation more to the end of the probe() so that we still
can use plain return in the first error cases.

Fixes: 3bc3206e1c0f ("serial: fsl_lpuart: Remove the alias node dependence")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200303174306.6015-3-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "tty: serial: fsl_lpuart: drop EARLYCON_DECLARE"</title>
<updated>2020-03-06T13:10:44Z</updated>
<author>
<name>Michael Walle</name>
<email>michael@walle.cc</email>
</author>
<published>2020-03-03T17:42:58Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=0e28ed6c9df986e937e488ec2a0c35bd4bb2a0af'/>
<id>urn:sha1:0e28ed6c9df986e937e488ec2a0c35bd4bb2a0af</id>
<content type='text'>
This reverts commit a659652f6169240a5818cb244b280c5a362ef5a4.

This broke the earlycon on LS1021A processors because the order of the
earlycon_setup() functions were changed. Before the commit the normal
lpuart32_early_console_setup() was called. After the commit the
lpuart32_imx_early_console_setup() is called instead.

Fixes: a659652f6169 ("tty: serial: fsl_lpuart: drop EARLYCON_DECLARE")
Signed-off-by: Michael Walle &lt;michael@walle.cc&gt;
Link: https://lore.kernel.org/r/20200303174306.6015-2-michael@walle.cc
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serdev: Fix detection of UART devices on Apple machines.</title>
<updated>2020-03-06T13:10:44Z</updated>
<author>
<name>Ronald Tschalär</name>
<email>ronald@innovation.ch</email>
</author>
<published>2020-02-11T19:47:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=35d4670aaec7206b5ef19c842ca33076bde562e4'/>
<id>urn:sha1:35d4670aaec7206b5ef19c842ca33076bde562e4</id>
<content type='text'>
On Apple devices the _CRS method returns an empty resource template, and
the resource settings are instead provided by the _DSM method. But
commit 33364d63c75d6182fa369cea80315cf1bb0ee38e (serdev: Add ACPI
devices by ResourceSource field) changed the search for serdev devices
to require valid, non-empty resource template, thereby breaking Apple
devices and causing bluetooth devices to not be found.

This expands the check so that if we don't find a valid template, and
we're on an Apple machine, then just check for the device being an
immediate child of the controller and having a "baud" property.

Cc: &lt;stable@vger.kernel.org&gt; # 5.5
Fixes: 33364d63c75d ("serdev: Add ACPI devices by ResourceSource field")
Signed-off-by: Ronald Tschalär &lt;ronald@innovation.ch&gt;
Link: https://lore.kernel.org/r/20200211194723.486217-1-ronald@innovation.ch
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_exar: add support for ACCES cards</title>
<updated>2020-03-05T20:30:04Z</updated>
<author>
<name>Jay Dolan</name>
<email>jay.dolan@accesio.com</email>
</author>
<published>2020-03-05T14:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=10c5ccc3c6d32f3d7d6c07de1d3f0f4b52f3e3ab'/>
<id>urn:sha1:10c5ccc3c6d32f3d7d6c07de1d3f0f4b52f3e3ab</id>
<content type='text'>
Add ACCES VIDs and PIDs that use the Exar chips

Signed-off-by: Jay Dolan &lt;jay.dolan@accesio.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200305140504.22237-1-jay.dolan@accesio.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty:serial:mvebu-uart:fix a wrong return</title>
<updated>2020-03-05T20:26:34Z</updated>
<author>
<name>tangbin</name>
<email>tangbin@cmss.chinamobile.com</email>
</author>
<published>2020-03-05T01:38:23Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4a3e208474204e879d22a310b244cb2f39e5b1f8'/>
<id>urn:sha1:4a3e208474204e879d22a310b244cb2f39e5b1f8</id>
<content type='text'>
in this place, the function should return a
negative value and the PTR_ERR already returns
a negative,so return -PTR_ERR() is wrong.

Signed-off-by: tangbin &lt;tangbin@cmss.chinamobile.com&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Acked-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Link: https://lore.kernel.org/r/20200305013823.20976-1-tangbin@cmss.chinamobile.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: selection, push sel_lock up</title>
<updated>2020-02-28T15:06:49Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2020-02-28T11:54:06Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2'/>
<id>urn:sha1:e8c75a30a23c6ba63f4ef6895cbf41fd42f21aa2</id>
<content type='text'>
sel_lock cannot nest in the console lock. Thanks to syzkaller, the
kernel states firmly:

&gt; WARNING: possible circular locking dependency detected
&gt; 5.6.0-rc3-syzkaller #0 Not tainted
&gt; ------------------------------------------------------
&gt; syz-executor.4/20336 is trying to acquire lock:
&gt; ffff8880a2e952a0 (&amp;tty-&gt;termios_rwsem){++++}, at: tty_unthrottle+0x22/0x100 drivers/tty/tty_ioctl.c:136
&gt;
&gt; but task is already holding lock:
&gt; ffffffff89462e70 (sel_lock){+.+.}, at: paste_selection+0x118/0x470 drivers/tty/vt/selection.c:374
&gt;
&gt; which lock already depends on the new lock.
&gt;
&gt; the existing dependency chain (in reverse order) is:
&gt;
&gt; -&gt; #2 (sel_lock){+.+.}:
&gt;        mutex_lock_nested+0x1b/0x30 kernel/locking/mutex.c:1118
&gt;        set_selection_kernel+0x3b8/0x18a0 drivers/tty/vt/selection.c:217
&gt;        set_selection_user+0x63/0x80 drivers/tty/vt/selection.c:181
&gt;        tioclinux+0x103/0x530 drivers/tty/vt/vt.c:3050
&gt;        vt_ioctl+0x3f1/0x3a30 drivers/tty/vt/vt_ioctl.c:364

This is ioctl(TIOCL_SETSEL).
Locks held on the path: console_lock -&gt; sel_lock

&gt; -&gt; #1 (console_lock){+.+.}:
&gt;        console_lock+0x46/0x70 kernel/printk/printk.c:2289
&gt;        con_flush_chars+0x50/0x650 drivers/tty/vt/vt.c:3223
&gt;        n_tty_write+0xeae/0x1200 drivers/tty/n_tty.c:2350
&gt;        do_tty_write drivers/tty/tty_io.c:962 [inline]
&gt;        tty_write+0x5a1/0x950 drivers/tty/tty_io.c:1046

This is write().
Locks held on the path: termios_rwsem -&gt; console_lock

&gt; -&gt; #0 (&amp;tty-&gt;termios_rwsem){++++}:
&gt;        down_write+0x57/0x140 kernel/locking/rwsem.c:1534
&gt;        tty_unthrottle+0x22/0x100 drivers/tty/tty_ioctl.c:136
&gt;        mkiss_receive_buf+0x12aa/0x1340 drivers/net/hamradio/mkiss.c:902
&gt;        tty_ldisc_receive_buf+0x12f/0x170 drivers/tty/tty_buffer.c:465
&gt;        paste_selection+0x346/0x470 drivers/tty/vt/selection.c:389
&gt;        tioclinux+0x121/0x530 drivers/tty/vt/vt.c:3055
&gt;        vt_ioctl+0x3f1/0x3a30 drivers/tty/vt/vt_ioctl.c:364

This is ioctl(TIOCL_PASTESEL).
Locks held on the path: sel_lock -&gt; termios_rwsem

&gt; other info that might help us debug this:
&gt;
&gt; Chain exists of:
&gt;   &amp;tty-&gt;termios_rwsem --&gt; console_lock --&gt; sel_lock

Clearly. From the above, we have:
 console_lock -&gt; sel_lock
 sel_lock -&gt; termios_rwsem
 termios_rwsem -&gt; console_lock

Fix this by reversing the console_lock -&gt; sel_lock dependency in
ioctl(TIOCL_SETSEL). First, lock sel_lock, then console_lock.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-by: syzbot+26183d9746e62da329b8@syzkaller.appspotmail.com
Fixes: 07e6124a1a46 ("vt: selection, close sel_buffer race")
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200228115406.5735-2-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: selection, push console lock down</title>
<updated>2020-02-28T15:06:49Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2020-02-28T11:54:05Z</published>
<link rel='alternate' type='text/html' href='https://git.kobert.dev/pm24.git/commit/?id=4b70dd57a15d2f4685ac6e38056bad93e81e982f'/>
<id>urn:sha1:4b70dd57a15d2f4685ac6e38056bad93e81e982f</id>
<content type='text'>
We need to nest the console lock in sel_lock, so we have to push it down
a bit. Fortunately, the callers of set_selection_* just lock the console
lock around the function call. So moving it down is easy.

In the next patch, we switch the order.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Fixes: 07e6124a1a46 ("vt: selection, close sel_buffer race")
Cc: stable &lt;stable@vger.kernel.org&gt;
Link: https://lore.kernel.org/r/20200228115406.5735-1-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
