WSL2-Linux-Kernel/drivers/video/console
Antonino A. Daplas 2ae8547775 vgacon: disallow console operations when in KD_GRAPHICS mode
Reported by James Pearson as:

	 boot to run level 3

	 if not root, then make sure /dev/console is writeable

	 login and type:

	 setterm -blank 0

	 start X

	 type into an xterm:

	 while true; do echo "" > /dev/console; usleep 100000; done

	 while the above loop is running switch to the text console and back
	 again (Ctrl-Alt-F1 then Ctrl-Alt-F7)

	 ... and the screen will be shifting (and wrapping) to the left.

This problem stems from continuously writing text to the system console (which
is in KD_TEXT mode) while the foreground console is in KD_GRAPHICS
mode. Somewhere along the way, console printing got confused and omitted the
KD_GRAPHICS/KD_TEXT test.  Thus, vgacon attempted to scroll the screen of X,
which causes X to shift.

Fix by disallowing vgacon to touch the hardware when the vc is in KD_GRAPHICS
mode. A definitive fix entails a full audit of the console code.

Signed-off-by: Antonino Daplas <adaplas@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:33 -07:00
..
Kconfig video: Disable vgacon for SuperH. 2006-09-27 13:20:22 +09:00
Makefile
bitblit.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
dummycon.c [PATCH] tty: Remove include of screen_info.h from tty.h 2006-07-10 13:24:16 -07:00
fbcon.c fbcon: check console-fb mapping in fbcon_get_requirement 2007-05-08 11:15:33 -07:00
fbcon.h [PATCH] fbdev modedb: make more pointer parameters const 2007-02-12 09:48:44 -08:00
fbcon_ccw.c [PATCH] fbcon:: make 3 functions static 2006-10-03 08:04:12 -07:00
fbcon_cw.c [PATCH] fbcon:: make 3 functions static 2006-10-03 08:04:12 -07:00
fbcon_rotate.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
fbcon_rotate.h [PATCH] fbcon: Code cleanups 2006-01-10 08:01:51 -08:00
fbcon_ud.c [PATCH] fbcon:: make 3 functions static 2006-10-03 08:04:12 -07:00
font_6x11.c
font_7x14.c
font_8x8.c
font_8x16.c
font_10x18.c
font_acorn_8x8.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
font_mini_4x6.c
font_pearl_8x8.c
font_sun8x16.c
font_sun12x22.c
fonts.c fbcon: font setting should check limitation of driver 2007-05-08 11:15:31 -07:00
mdacon.c vt: add color support to the "underline" and "italic" attributes 2007-05-08 11:15:27 -07:00
newport_con.c [PATCH] vt: Remove VT-specific declarations and definitions from tty.h 2006-07-10 13:24:16 -07:00
prom.uni
promcon.c vt: add color support to the "underline" and "italic" attributes 2007-05-08 11:15:27 -07:00
softcursor.c [PATCH] softcursor.c: avoid unaligned accesses 2006-12-08 08:29:07 -08:00
sticon.c vt: add color support to the "underline" and "italic" attributes 2007-05-08 11:15:27 -07:00
sticore.c fbcon: font setting should check limitation of driver 2007-05-08 11:15:31 -07:00
tileblit.c Remove obsolete #include <linux/config.h> 2006-06-30 19:25:36 +02:00
vgacon.c vgacon: disallow console operations when in KD_GRAPHICS mode 2007-05-08 11:15:33 -07:00