kernel-ark/drivers/usb/misc
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
..
sisusbvga vt/vgacon: Check if screen resize request comes from userspace 2007-10-16 09:43:20 -07:00
adutux.c USB: missing test for ESHUTDOWN in adutux driver 2007-10-12 14:55:16 -07:00
appledisplay.c Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight 2007-07-22 11:19:46 -07:00
auerswald.c
berry_charge.c USB: fix memory leak in berry_charge driver 2007-10-12 14:55:20 -07:00
cypress_cy7c63.c
cytherm.c
emi26_fw.h
emi26.c
emi62_fw_m.h
emi62_fw_s.h
emi62.c
ftdi-elan.c USB: ftdi-elan.c: kmalloc + memset conversion to kzalloc 2007-10-12 14:55:15 -07:00
idmouse.c
iowarrior.c USB: misc: iowarrior: clean up urb->status usage 2007-07-19 17:46:07 -07:00
Kconfig
ldusb.c USB: misc: ldusb: clean up urb->status usage 2007-07-19 17:46:07 -07:00
legousbtower.c USB: misc: legousbtower: clean up urb->status usage 2007-07-19 17:46:07 -07:00
Makefile
phidget.c
phidget.h
phidgetkit.c USB: misc: phidgetkit: clean up urb->status usage 2007-07-19 17:46:07 -07:00
phidgetmotorcontrol.c USB: misc: phidgetmotorcontrol: clean up urb->status usage 2007-07-19 17:46:07 -07:00
phidgetservo.c
rio500_usb.h
rio500.c
trancevibrator.c
usb_u132.h
usblcd.c USB: misc: usblcd: clean up urb->status usage 2007-07-19 17:46:08 -07:00
usbled.c
usbtest.c USB: misc: usbtest: clean up urb->status usage 2007-07-19 17:46:08 -07:00
uss720.c USB: misc: uss720: clean up urb->status usage 2007-07-19 17:46:08 -07:00