<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/vt, branch v3.15.2</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v3.15.2</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v3.15.2'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2014-03-01T00:25:47+00:00</updated>
<entry>
<title>vt: detect and ignore OSC codes.</title>
<updated>2014-03-01T00:25:47+00:00</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2014-02-19T00:38:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=63f3a16db915096d7a80a96748adba00feb07a32'/>
<id>urn:sha1:63f3a16db915096d7a80a96748adba00feb07a32</id>
<content type='text'>
These can be used to send commands consisting of an arbitrary string to the
terminal, most often used to set a terminal's window title or to redefine
the colour palette.  Our console doesn't use OSC, unlike everything else,
which can lead to junk being displayed if a process sends such a code
unconditionally.

The rules for termination follow established practice rather than Ecma-48.
Ecma-48 requires the string to use only byte values 0x08..0x0D and
0x20..0x7E, terminated with either ESC \ or 0x9C.  This would disallow using
8-bit characters, which are reasonable for example in window titles.
A widespread idiom is to terminate with 0x07.  The behaviour for other
control characters differs between terminal emulators, I followed libvte and
xterm:
* 0x07 and ESC anything terminate
* nothing else terminates, all 8-bit values including 0x9C are considered a
  part of the string

Signed-off-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: drop an useless enum and assignment.</title>
<updated>2014-03-01T00:25:47+00:00</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2014-02-19T00:40:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b290af68de57196e7cb34805f41cd3416ed1a791'/>
<id>urn:sha1:b290af68de57196e7cb34805f41cd3416ed1a791</id>
<content type='text'>
Signed-off-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: Fix secure clear screen</title>
<updated>2014-02-13T19:12:00+00:00</updated>
<author>
<name>Petr Písař</name>
<email>petr.pisar@atlas.cz</email>
</author>
<published>2014-02-06T20:01:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0930b0950a8996aa88b0d2ba4bb2bab27cc36bc7'/>
<id>urn:sha1:0930b0950a8996aa88b0d2ba4bb2bab27cc36bc7</id>
<content type='text'>
\E[3J console code (secure clear screen) needs to update_screen(vc)
in order to write-through blanks into off-screen video memory.

This has been removed accidentally in 3.6 by:

commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c
Author: Jean-François Moine &lt;moinejf@free.fr&gt;
Date:   Thu Sep 6 19:24:13 2012 +0200

    tty vt: Fix line garbage in virtual console on command line edition

Signed-off-by: Petr Písař &lt;petr.pisar@atlas.cz&gt;
Cc: stable &lt;stable@vger.kernel.org&gt; # 3.6
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: properly ignore xterm-256 colour codes</title>
<updated>2013-09-26T22:58:27+00:00</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2013-07-12T20:23:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3415097ff0529eac264b8ccfa06572871e45c090'/>
<id>urn:sha1:3415097ff0529eac264b8ccfa06572871e45c090</id>
<content type='text'>
This is not a bug on our side, but a misdesign in ITU T.416, yet with
all popular terminals supporting these codes, people consider this to
be a bug in Linux.  By breaking the design principles behind SGR codes
(gracefully ignoring unsupported ones should not require knowing about
them), 256 colour ones tend to turn blinking on before invoking an
arbitrary unrelated command.

This commit doesn't add such support, merely skips such codes without
ill effects.

Signed-off-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: break a couple of obsolete SCOish codes.</title>
<updated>2013-09-26T22:58:26+00:00</updated>
<author>
<name>Adam Borowski</name>
<email>kilobyte@angband.pl</email>
</author>
<published>2013-09-10T20:54:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=64545880927e15d5e82a9f33c3fd0704c775bd80'/>
<id>urn:sha1:64545880927e15d5e82a9f33c3fd0704c775bd80</id>
<content type='text'>
No modern terminal supports them, and SGR 38 conflicts with detecting
xterm-256 colours.  This also makes SGR 39 consistent with other popular
terminals.  Neither are used by ncurses' terminfo.

Signed-off-by: Adam Borowski &lt;kilobyte@angband.pl&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>vt: make the default color configurable</title>
<updated>2013-08-05T07:06:46+00:00</updated>
<author>
<name>Clemens Ladisch</name>
<email>clemens@ladisch.de</email>
</author>
<published>2013-08-04T11:09:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3855ae1c486a2d1b65a96fac8d504ef7197e62cd'/>
<id>urn:sha1:3855ae1c486a2d1b65a96fac8d504ef7197e62cd</id>
<content type='text'>
The virtual console has (undocumented) module parameters to set the
colors for italic and underlined text, but the default text color was
hardcoded for some reason.  This made it impossible to change the color
for startup messages, or to set the default for new virtual consoles.
Add a module parameter for that, and document the entire bunch.

Any hacker who thinks that a command prompt on a "black screen with
white font" is not supicious enough can now use the kernel parameter
vt.color=10 to get a nice, evil green.

Signed-off-by: Clemens Ladisch &lt;clemens@ladisch.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Remove dead code</title>
<updated>2013-07-26T23:19:48+00:00</updated>
<author>
<name>Andreas Platschek</name>
<email>andi.platschek@gmail.com</email>
</author>
<published>2013-07-26T04:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cf940ebe98e693aec2d10f9af2fb84eb55234e3c'/>
<id>urn:sha1:cf940ebe98e693aec2d10f9af2fb84eb55234e3c</id>
<content type='text'>
-&gt; The ledptrs[] array is never initialized.
-&gt; There is no place where kbd-&gt;ledmode is set to LED_SHOW_MEM therefore the if
   statement does not make much sense.
-&gt; Since LED_SHOW_MEM is not used, it can be removed from the header file as well.

Signed-off-by: Andreas Platschek &lt;andi.platschek@gmail.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: Fix unsafe vt paste_selection()</title>
<updated>2013-07-23T23:47:10+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:36:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1'/>
<id>urn:sha1:a7c8d58c79853adeebf0a1ddc9c63e433b4d97f1</id>
<content type='text'>
Convert the tty_buffer_flush() exclusion mechanism to a
public interface - tty_buffer_lock/unlock_exclusive() - and use
the interface to safely write the paste selection to the line
discipline.

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: Convert termios_mutex to termios_rwsem</title>
<updated>2013-07-23T23:43:01+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:14:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6a1c0680cf3ba94356ecd58833e1540c93472a57'/>
<id>urn:sha1:6a1c0680cf3ba94356ecd58833e1540c93472a57</id>
<content type='text'>
termios is commonly accessed unsafely (especially by N_TTY)
because the existing mutex forces exclusive access.
Convert existing usage.

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 ldisc input flow control concurrency-friendly</title>
<updated>2013-07-23T23:42:59+00:00</updated>
<author>
<name>Peter Hurley</name>
<email>peter@hurleysoftware.com</email>
</author>
<published>2013-06-15T13:14:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=24a89d1cb69b6c488cf16d98dd02e7820f62b40c'/>
<id>urn:sha1:24a89d1cb69b6c488cf16d98dd02e7820f62b40c</id>
<content type='text'>
Although line discipline receiving is single-producer/single-consumer,
using tty-&gt;receive_room to manage flow control creates unnecessary
critical regions requiring additional lock use.

Instead, introduce the optional .receive_buf2() ldisc method which
returns the # of bytes actually received. Serialization is guaranteed
by the caller.

In turn, the line discipline should schedule the buffer work item
whenever space becomes available; ie., when there is room to receive
data and receive_room() previously returned 0 (the buffer work
item stops processing if receive_buf2() returns 0). Note the
'no room' state need not be atomic despite concurrent use by two
threads because only the buffer work thread can set the state and
only the read() thread can clear the state.

Add n_tty_receive_buf2() as the receive_buf2() method for N_TTY.
Provide a public helper function, tty_ldisc_receive_buf(), to use
when directly accessing the receive_buf() methods.

Line disciplines not using input flow control can continue to set
tty-&gt;receive_room to a fixed value and only provide the receive_buf()
method.

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