freebsd-dev/sys/dev/vt
Ian Lepore 1cc7e361a6 When allocating a new keyboard at vt_upgrade() time, unwind any cngrabs
done on the old keyboard and then do the corresponding number of grabs
on the new keyboard.

This fixes a race that can leave the system with a non-functioning
keyboard.  It goes like this...

 - The bios claims there is an AT keyboard, atkbd attaches.
 - SI_SUB_INT_CONFIG_HOOKS runs.
 - USB probes devices. Devices begin attaching, including disks.
 - GELI prompts for a password for a just-attached disk, which results
   in a cngrab() while atkbd is the keyboard.
 - A USB keyboard attaches.
 - vt_upgrade() runs and switches the keyboard to the new USB keyboard,
   but because cngrab was never called for it, it's not activated and
   keystrokes are ignored.
 - Now there is no functional keyboard and no way to get one; even
   plugging in a different USB keyboard doesn't help, because the console
   is still grabbed, still waiting for a GELI pw.

Discussed with:	     ray@
2018-12-31 01:09:23 +00:00
..
colors vt(4): Use default VGA palette 2018-05-10 17:00:33 +00:00
font Update vt(4) "Terminus BSD Console" font to v4.46 2018-04-12 20:21:04 +00:00
hw Speed up vt(4) by keeping a record of the most recently drawn character and 2018-08-25 16:14:56 +00:00
logo sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_buf.c teken, vt(4): New callbacks to lock the terminal once 2018-05-16 09:01:02 +00:00
vt_consolectl.c sys/dev: further adoption of SPDX licensing ID tags. 2017-11-27 14:52:40 +00:00
vt_core.c When allocating a new keyboard at vt_upgrade() time, unwind any cngrabs 2018-12-31 01:09:23 +00:00
vt_cpulogos.c vt(4): Resume vt_timer() in vtterm_post_input() only 2018-05-16 10:08:50 +00:00
vt_font.c Limit glyph count in vtfont_load to avoid integer overflow. 2018-04-04 05:21:46 +00:00
vt_sysmouse.c Remove the Yarrow PRNG algorithm option in accordance with due notice 2018-08-26 12:51:46 +00:00
vt.h Speed up vt(4) by keeping a record of the most recently drawn character and 2018-08-25 16:14:56 +00:00