linux/include
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
..
acpi
asm-alpha alpha: beautify vmlinux.lds 2007-10-16 09:43:03 -07:00
asm-arm s3c2410fb: removes lcdcon1 register value from s3c2410fb_display 2007-10-16 09:43:18 -07:00
asm-avr32 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-blackfin
asm-cris
asm-frv include/asm-frv/thread_info.h: kmalloc + memset conversion to kzalloc 2007-10-16 09:43:03 -07:00
asm-generic flush icache before set_pte() on ia64: flush icache at set_pte 2007-10-16 09:42:59 -07:00
asm-h8300
asm-ia64 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-m32r m32r: convert to generic sys_ptrace 2007-10-16 09:43:04 -07:00
asm-m68k
asm-m68knommu M68KNOMMU: remove unused config symbol CONFIG_DISKtel 2007-10-16 09:43:03 -07:00
asm-mips move a few definitions to au1000_xxs1500.c 2007-10-16 09:42:50 -07:00
asm-parisc
asm-powerpc kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-ppc
asm-s390 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-sh x86: optimize page faults like all other achitectures and kill notifier cruft 2007-10-16 09:42:50 -07:00
asm-sh64
asm-sparc
asm-sparc64 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-um uml: style fixes in FP code 2007-10-16 09:43:07 -07:00
asm-v850
asm-x86 kprobes: support kretprobe blacklist 2007-10-16 09:43:10 -07:00
asm-xtensa
crypto
keys
linux vt/vgacon: Check if screen resize request comes from userspace 2007-10-16 09:43:20 -07:00
math-emu
media
mtd
net
pcmcia pcmcia: use DMA_MASK_NONE for the default for all pcmcia devices 2007-10-16 09:42:50 -07:00
rdma
rxrpc
scsi
sound
video pm2fb: hardware cursor support for the Permedia2 2007-10-16 09:43:18 -07:00
xen
Kbuild