2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 06:34:11 +08:00
linux-next/drivers/tty/vt
Adam Borowski 63f3a16db9 vt: detect and ignore OSC codes.
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 <kilobyte@angband.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 16:25:47 -08:00
..
.gitignore
consolemap.c driver: tty: vt: remove cast for kmalloc return value 2013-03-18 17:09:37 -07:00
cp437.uni
defkeymap.c_shipped
defkeymap.map
keyboard.c tty: Remove dead code 2013-07-26 16:19:48 -07:00
Makefile tty: vt/Makefile: set the variables to static 2013-01-15 21:52:24 -08:00
selection.c tty: Fix unsafe vt paste_selection() 2013-07-23 16:47:10 -07:00
vc_screen.c vc: switch to fixed_size_llseek() 2013-06-29 12:57:30 +04:00
vt_ioctl.c tty/vt: Return EBUSY if deallocating VT1 and it is busy 2013-06-17 12:37:29 -07:00
vt.c vt: detect and ignore OSC codes. 2014-02-28 16:25:47 -08:00