linux/drivers/video
Antonino A. Daplas e400b6ec4e vt/vgacon: Check if screen resize request comes from userspace
Various console drivers are able to resize the screen via the con_resize()
hook.  This hook is also visible in userspace via the TIOCWINSZ, VT_RESIZE and
VT_RESIZEX ioctl's.  One particular utility, SVGATextMode, expects that
con_resize() of the VGA console will always return success even if the
resulting screen is not compatible with the hardware.  However, this
particular behavior of the VGA console, as reported in Kernel Bugzilla Bug
7513, can cause undefined behavior if the user starts with a console size
larger than 80x25.

To work around this problem, add an extra parameter to con_resize().  This
parameter is ignored by drivers except for vgacon.  If this parameter is
non-zero, then the resize request came from a VT_RESIZE or VT_RESIZEX ioctl
and vgacon will always return success.  If this parameter is zero, vgacon will
return -EINVAL if the requested size is not compatible with the hardware.  The
latter is the more correct behavior.

With this change, SVGATextMode should still work correctly while in-kernel and
stty resize calls can expect correct behavior from vgacon.

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-10-16 09:43:20 -07:00
..
aty Radeonfb Xpress 200M RC410 support 2007-10-16 09:43:19 -07:00
backlight fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
console vt/vgacon: Check if screen resize request comes from userspace 2007-10-16 09:43:20 -07:00
display
geode drivers/video/geode/lxfb_core.c: fix lxfb_setup warning 2007-10-16 09:43:15 -07:00
i810
intelfb Intel FB: more interlaced mode support 2007-10-16 09:43:20 -07:00
kyro fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
logo
matrox fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
mbx mbxfb: Improvements and new features 2007-10-16 09:43:14 -07:00
nvidia nvidiafb: Add boot option to reverse i2c port assignment 2007-10-16 09:43:19 -07:00
omap
pnx4008 fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
riva
savage fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sis fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
vermilion fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
68328fb.c
acornfb.c
acornfb.h
amba-clcd.c
amifb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
arcfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
arkfb.c
asiliantfb.c
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
atafb.h
atmel_lcdfb.c
au1100fb.c
au1100fb.h
au1200fb.c
au1200fb.h
bt431.h
bt455.h
bw2.c
c2p.c
c2p.h
cfbcopyarea.c fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
cfbfillrect.c fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
cfbimgblt.c fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
cg3.c
cg6.c
cg14.c
chipsfb.c
cirrusfb.c cirrusfb: code improvement 2nd part 2007-10-16 09:43:18 -07:00
clps711xfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
controlfb.c
controlfb.h
cyber2000fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
cyber2000fb.h
cyblafb.c
dnfb.c
edid.h
epson1355fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fb_ddc.c
fb_defio.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fb_draw.h fbdev: Support for byte-reversed framebuffer formats 2007-10-16 09:43:19 -07:00
fb_notify.c
fb_sys_fops.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcmap.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
fbcvt.c
fbmem.c unexport fb_prepare_logo 2007-10-16 09:43:15 -07:00
fbmon.c fbdev: fb_create_modedb() non-static `int first = 1;' 2007-10-16 09:43:15 -07:00
fbsysfs.c
ffb.c
fm2fb.c
g364fb.c
gbefb.c
gxt4500.c
hecubafb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
hgafb.c
hitfb.c
hpfb.c
igafb.c
imacfb.c
imsttfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
imxfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
imxfb.h
Kconfig video gfx: fix menu ordering 2007-10-16 09:43:20 -07:00
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile uvesafb: the driver core 2007-10-16 09:43:13 -07:00
maxinefb.c
modedb.c fbdev: find mode with the highest/safest refresh rate in fb_find_mode() 2007-10-16 09:43:18 -07:00
neofb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
offb.c
output.c
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c pm2fb: replace busy waiting with cpu_relax 2007-10-16 09:43:19 -07:00
pm3fb.c pm3fb: replace busy waiting with cpu_relax 2007-10-16 09:43:19 -07:00
pmag-aa-fb.c
pmag-ba-fb.c drivers/video/pmag-ba-fb.c: improve diagnostics 2007-10-16 09:43:19 -07:00
pmagb-b-fb.c
ps3fb.c ps3fb: Fix spurious mode change failures 2007-10-16 09:43:19 -07:00
pvr2fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
pxafb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
pxafb.h pxafb: Add support for other palette formats 2007-10-16 09:43:15 -07:00
q40fb.c
s1d13xxxfb.c
s3c2410fb.c s3c2410fb: make use of default_display settings 2007-10-16 09:43:18 -07:00
s3c2410fb.h s3c2410fb: source code improvements 2007-10-16 09:43:18 -07:00
s3fb.c
sa1100fb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sa1100fb.h
sbuslib.c
sbuslib.h
sgivwfb.c
skeletonfb.c skeletonfb: wrong field name fix 2007-10-16 09:43:14 -07:00
sm501fb.c sm501fb: Ensure panel interface is not tristated when setup 2007-10-16 09:43:14 -07:00
sstfb.c fbdev: change asm/uaccess.h to linux/uaccess.h 2007-10-16 09:43:17 -07:00
sticore.h
stifb.c
sunxvr500.c
sunxvr2500.c
svgalib.c
syscopyarea.c
sysfillrect.c
sysimgblt.c
tcx.c
tdfxfb.c tdfxfb: checkpatch fixes 2007-10-16 09:43:19 -07:00
tgafb.c
tridentfb.c tridentfb: coding style improvement 2007-10-16 09:43:15 -07:00
uvesafb.c uvesafb: the driver core 2007-10-16 09:43:13 -07:00
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c vfb: make virtual framebuffer mmapable 2007-10-16 09:43:18 -07:00
vga16fb.c
vgastate.c
vt8623fb.c
w100fb.c
w100fb.h
xilinxfb.c XilinxFB: typo bugfix 2007-10-14 08:56:33 -07:00