lkml.org 
[lkml]   [2005]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH]vt.c, kernel 2.6.10 (also applies to 2.4.28 and 2.2.26).

There is a minor bug into the linux console driver.
It appeared in kernel 2.1.112 (but the ChangeLog is void about
this modification), and affects 2.2, 2.4 and 2.6 trees.

The point is about the DEC screen alignment test : the kernel is fulling
the text console with 'E's (witch is the correct behaviour) without
checking if the process who sent the screen alignment test sequence
is the owner of the current console.

In kernels 2.2.26 and 2.4.28, the file drivers/char/vt.c was called
drivers/char/console.c .

Notice : I've tested my patch on kernel 2.4, it works properly, and, since
it is a very little patch and very easy to understand (I think), I believe
it will also work with kernels 2.2 and 2.6, but I've made no test on them.
Please check my patch on 2.2 and 2.6 before applying it to these versions.

Checking can be done by login on vt1 and then typing :
$ chvt 2 && sleep 1 && echo -e "\033#8"
If vt2 gets full of 'E's, the kernel is broken.

Emmanuel Colbus
--- old/drivers/char/vt.c 2004-12-24 22:35:25.000000000 +0100
+++ patched/drivers/char/vt.c 2005-01-04 10:37:46.000000000 +0100
@@ -1847,7 +1847,7 @@
csi_J(currcons, 2);
video_erase_char =
(video_erase_char & 0xff00) | ' ';
- do_update_region(currcons, origin, screenbuf_size/2);
+ update_region(currcons, origin, screenbuf_size/2);
}
return;
case ESsetG0:DEC screen alignment test bug fix Emmanuel Colbus <emmanuel.colbus@ensimag.imag.fr>
--- old/drivers/char/console.c 2005-01-03 15:51:22.000000000 +0100
+++ patched/drivers/char/console.c 2005-01-03 15:31:45.000000000 +0100
@@ -1781,7 +1781,7 @@
csi_J(currcons, 2);
video_erase_char =
(video_erase_char & 0xff00) | ' ';
- do_update_region(currcons, origin, screenbuf_size/2);
+ update_region(currcons, origin, screenbuf_size/2);
}
return;
case ESsetG0:--- old/drivers/char/console.c Mon Sep 16 18:26:11 2002
+++ patched/drivers/char/console.c Tue Jan 4 09:54:58 2005
@@ -1742,7 +1742,7 @@
csi_J(currcons, 2);
video_erase_char =
(video_erase_char & 0xff00) | ' ';
- do_update_region(currcons, origin, screenbuf_size/2);
+ update_region(currcons, origin, screenbuf_size/2);
}
return;
case ESsetG0:
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.028 / U:1.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site