<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/tty/vt, branch v4.7</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.7</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-07-23T03:10:48Z</updated>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input</title>
<updated>2016-07-23T03:10:48Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-07-23T03:10:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3aa536d9aafc2806dd3439114e25b253086312a9'/>
<id>urn:sha1:3aa536d9aafc2806dd3439114e25b253086312a9</id>
<content type='text'>
Pull input fixes from Dmitry Torokhov:
 "A few more fixes for the input subsystem:

   - restore naming for tsc2005 touchscreens as some userspace match on it
   - fix out of bound access in legacy keyboard driver
   - fixup in RMI4 driver

  Everything is tagged for stable as well"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
  Input: tsc200x - report proper input_dev name
  tty/vt/keyboard: fix OOB access in do_compute_shiftstate()
  Input: synaptics-rmi4 - fix maximum size check for F12 control register 8
</content>
</entry>
<entry>
<title>tty/vt/keyboard: fix OOB access in do_compute_shiftstate()</title>
<updated>2016-07-21T00:50:23Z</updated>
<author>
<name>Dmitry Torokhov</name>
<email>dmitry.torokhov@gmail.com</email>
</author>
<published>2016-06-27T21:12:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=510cccb5b0c8868a2b302a0ab524da7912da648b'/>
<id>urn:sha1:510cccb5b0c8868a2b302a0ab524da7912da648b</id>
<content type='text'>
The size of individual keymap in drivers/tty/vt/keyboard.c is NR_KEYS,
which is currently 256, whereas number of keys/buttons in input device (and
therefor in key_down) is much larger - KEY_CNT - 768, and that can cause
out-of-bound access when we do

	sym = U(key_maps[0][k]);

with large 'k'.

To fix it we should not attempt iterating beyond smaller of NR_KEYS and
KEY_CNT.

Also while at it let's switch to for_each_set_bit() instead of open-coding
it.

Reported-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
Reviewed-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov &lt;dmitry.torokhov@gmail.com&gt;
</content>
</entry>
<entry>
<title>tty: vt: Fix soft lockup in fbcon cursor blink timer.</title>
<updated>2016-06-25T17:41:13Z</updated>
<author>
<name>David Daney</name>
<email>david.daney@cavium.com</email>
</author>
<published>2016-05-17T18:41:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1b45996d2ebf9680ccd0db875fc668aa025f40fd'/>
<id>urn:sha1:1b45996d2ebf9680ccd0db875fc668aa025f40fd</id>
<content type='text'>
We are getting somewhat random soft lockups with this signature:

[   86.992215] [&lt;fffffc00080935e0&gt;] el1_irq+0xa0/0x10c
[   86.997082] [&lt;fffffc000841822c&gt;] cursor_timer_handler+0x30/0x54
[   87.002991] [&lt;fffffc000810ec44&gt;] call_timer_fn+0x54/0x1a8
[   87.008378] [&lt;fffffc000810ef88&gt;] run_timer_softirq+0x1c4/0x2bc
[   87.014200] [&lt;fffffc000809077c&gt;] __do_softirq+0x114/0x344
[   87.019590] [&lt;fffffc00080af45c&gt;] irq_exit+0x74/0x98
[   87.024458] [&lt;fffffc00080fac20&gt;] __handle_domain_irq+0x98/0xfc
[   87.030278] [&lt;fffffc000809056c&gt;] gic_handle_irq+0x94/0x190

This is caused by the vt visual_init() function calling into
fbcon_init() with a vc_cur_blink_ms value of zero.  This is a
transient condition, as it is later set to a non-zero value.  But, if
the timer happens to expire while the blink rate is zero, it goes into
an endless loop, and we get soft lockup.

The fix is to initialize vc_cur_blink_ms before calling the con_init()
function.

Signed-off-by: David Daney &lt;david.daney@cavium.com&gt;
Cc: stable@vger.kernel.org
Acked-by: Pavel Machek &lt;pavel@ucw.cz&gt;
Tested-by: Ming Lei &lt;ming.lei@canonical.com&gt;
Acked-by: Scot Doyle &lt;lkml14@scotdoyle.com&gt;
Tested-by: Henrique de Moraes Holschuh &lt;hmh@hmh.eng.br&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: vt, finish looping on duplicate</title>
<updated>2016-05-03T22:59:15Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-05-03T15:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=96317e9e2a12d01eaaebf6b1e92b0f96c121e20a'/>
<id>urn:sha1:96317e9e2a12d01eaaebf6b1e92b0f96c121e20a</id>
<content type='text'>
When the console is already registered, stop crawling the
registered_con_driver array and return an error immediatelly.

This makes the code more obvious. And we do not need to initialize
retval anymore.

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>tty: vt, return error when con_startup fails</title>
<updated>2016-05-03T22:59:15Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-05-03T15:05:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6798df4c5fe0a7e6d2065cf79649a794e5ba7114'/>
<id>urn:sha1:6798df4c5fe0a7e6d2065cf79649a794e5ba7114</id>
<content type='text'>
When csw-&gt;con_startup() fails in do_register_con_driver, we return no
error (i.e. 0). This was changed back in 2006 by commit 3e795de763.
Before that we used to return -ENODEV.

So fix the return value to be -ENODEV in that case again.

Fixes: 3e795de763 ("VT binding: Add binding/unbinding support for the VT console")
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-by: "Dan Carpenter" &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: vt, use proper type for default colors</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-03-31T08:08:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=91e74ca5e7ac4ec6c61b84d6618eb5e401f852f0'/>
<id>urn:sha1:91e74ca5e7ac4ec6c61b84d6618eb5e401f852f0</id>
<content type='text'>
Every user of default_red, default_grn, and default_blu treats them as
unsigned char. So make it really unsigned char.

And indent the initializers and module_param properly.

This saves ~ 100 bytes of data.

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>tty: vt, make color_table const</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-03-31T08:08:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8ede5cce4f0baff77ef63aa3cb3afc65d0317e0b'/>
<id>urn:sha1:8ede5cce4f0baff77ef63aa3cb3afc65d0317e0b</id>
<content type='text'>
This means all -&gt;con_set_palette have to have the second parameter
const too now.

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>tty: vt, get rid of weird source code flow</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-03-31T08:08:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34902b7f2754e6d890feb0cee34187f1bc75c930'/>
<id>urn:sha1:34902b7f2754e6d890feb0cee34187f1bc75c930</id>
<content type='text'>
Some code in vc_allocate is indented by 4 spaces. It is inside a
condition. Invert the condition and move the code to the first
indentation level (using \tab). And insert some empty lines to have
logical code blocks separated.

Then, instead of freeing in an 'if' false branch, use goto-error
label as fail path.

Maybe better to look at this patch with diff -w -b.

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>tty: vt, remove reduntant check</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Jiri Slaby</name>
<email>jslaby@suse.cz</email>
</author>
<published>2016-03-31T08:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=182846a00f489849c55d113954f0c4a8a286ca39'/>
<id>urn:sha1:182846a00f489849c55d113954f0c4a8a286ca39</id>
<content type='text'>
MAX_NR_CONSOLES and MAX_NR_USER_CONSOLES are both 63 since they were
introduced in 1.1.54. And since vc_allocate does:

if (currcons &gt;= MAX_NR_CONSOLES)
	return -ENXIO;

if (!vc_cons[currcons].d) {
	if (currcons &gt;= MAX_NR_USER_CONSOLES &amp;&amp; !capable(CAP_SYS_RESOURCE))
		return -EPERM;
}

the second check is pointless. Remove both the check and the macro
MAX_NR_USER_CONSOLES.

Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Reported-by: Fugang Duan &lt;fugang.duan@nxp.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Replace TTY_THROTTLED bit tests with tty_throttled()</title>
<updated>2016-04-30T16:26:55Z</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2016-04-10T00:11:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97ef38b8210d7459d4cb51668cdf3983772ac6b7'/>
<id>urn:sha1:97ef38b8210d7459d4cb51668cdf3983772ac6b7</id>
<content type='text'>
Abstract TTY_THROTTLED bit tests with tty_throttled().

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