kernel_optimize_test/drivers/video/fbdev
Helge Deller cecb806c76 fbcon: Prevent that screen size is smaller than font size
commit e64242caef18b4a5840b0e7a9bff37abd4f4f933 upstream.

We need to prevent that users configure a screen size which is smaller than the
currently selected font size. Otherwise rendering chars on the screen will
access memory outside the graphics memory region.

This patch adds a new function fbcon_modechange_possible() which
implements this check and which later may be extended with other checks
if necessary.  The new function is called from the FBIOPUT_VSCREENINFO
ioctl handler in fbmem.c, which will return -EINVAL if userspace asked
for a too small screen size.

Signed-off-by: Helge Deller <deller@gmx.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org # v5.4+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-07-12 16:32:18 +02:00
..
aty
core fbcon: Prevent that screen size is smaller than font size 2022-07-12 16:32:18 +02:00
geode
i810
intelfb
kyro video: fbdev: kyro: Error out if 'pixclock' equals zero 2021-09-18 13:40:22 +02:00
matrox video: fbdev: matroxfb: set maxvram of vbG200eW to the same as vbG200 to avoid black screen 2022-04-08 14:40:05 +02:00
mb862xx
mmp
nvidia video: fbdev: nvidiafb: Use strscpy() to prevent buffer overflow 2022-04-08 14:40:33 +02:00
omap
omap2 video: fbdev: omapfb: panel-tpo-td043mtea1: Use sysfs_emit() instead of snprintf() 2022-04-08 14:40:35 +02:00
riva video: fbdev: riva: Error out if 'pixclock' equals zero 2021-09-18 13:40:22 +02:00
savage
sis
vermilion
via
68328fb.c
acornfb.c
acornfb.h
amba-clcd.c video: fbdev: clcdfb: Fix refcount leak in clcdfb_of_vram_setup 2022-06-09 10:21:20 +02:00
amifb.c
arcfb.c
arkfb.c
asiliantfb.c video: fbdev: asiliantfb: Error out if 'pixclock' equals zero 2021-09-18 13:40:22 +02:00
atafb_iplan2p2.c
atafb_iplan2p4.c
atafb_iplan2p8.c
atafb_mfb.c
atafb_utils.h
atafb.c video: fbdev: atari: Atari 2 bpp (STe) palette bugfix 2022-04-08 14:39:56 +02:00
atafb.h
atmel_lcdfb.c video: fbdev: atmel_lcdfb: fix an error code in atmel_lcdfb_probe() 2022-04-08 14:40:06 +02:00
au1100fb.c
au1100fb.h
au1200fb.c
au1200fb.h
broadsheetfb.c
bt431.h
bt455.h
bw2.c
c2p_core.h
c2p_iplan2.c
c2p_planar.c
c2p.h
carminefb_regs.h
carminefb.c
carminefb.h
cg3.c
cg6.c
cg14.c
chipsfb.c video: fbdev: chipsfb: use memset_io() instead of memset() 2021-11-18 14:04:17 +01:00
cirrusfb.c video: fbdev: cirrusfb: check pixclock to avoid divide by zero 2022-04-08 14:40:34 +02:00
clps711x-fb.c
cobalt_lcdfb.c
controlfb.c video: fbdev: controlfb: Fix COMPILE_TEST build 2022-04-08 14:40:06 +02:00
controlfb.h
cyber2000fb.c
cyber2000fb.h
da8xx-fb.c
dnfb.c
edid.h
efifb.c
ep93xx-fb.c
ffb.c
fm2fb.c
fsl-diu-fb.c
g364fb.c
gbefb.c video: fbdev: gbefb: Only instantiate device when built for IP32 2021-10-13 10:04:28 +02:00
goldfishfb.c
grvga.c
gxt4500.c
hecubafb.c
hgafb.c video: hgafb: correctly handle card detect failure during probe 2021-05-26 12:06:57 +02:00
hitfb.c
hpfb.c
hyperv_fb.c video: fbdev: hyperv_fb: Allow resolutions with size > 64 MB for Gen1 2022-06-14 18:32:38 +02:00
i740_reg.h
i740fb.c
imsttfb.c Revert "video: imsttfb: fix potential NULL pointer dereferences" 2021-05-26 12:06:54 +02:00
imxfb.c video: fbdev: imxfb: Fix an error message 2021-07-14 16:56:15 +02:00
Kconfig
leo.c
macfb.c
macmodes.c
macmodes.h
Makefile
maxinefb.c
metronomefb.c
mx3fb.c
n411.c
neofb.c
ocfb.c
offb.c
p9100.c
platinumfb.c
platinumfb.h
pm2fb.c
pm3fb.c
pmag-aa-fb.c
pmag-ba-fb.c
pmagb-b-fb.c
ps3fb.c
pvr2fb.c
pxa3xx-gcu.c video: fbdev: pxa3xx-gcu: release the resources correctly in pxa3xx_gcu_probe/remove() 2022-06-14 18:32:39 +02:00
pxa3xx-gcu.h
pxa168fb.c
pxa168fb.h
pxafb.c
pxafb.h
q40fb.c
s1d13xxxfb.c
s3c-fb.c
s3c2410fb-regs-lcd.h
s3c2410fb.c
s3c2410fb.h
s3fb.c
sa1100fb.c
sa1100fb.h
sbuslib.c
sbuslib.h
sh_mobile_lcdcfb.c
sh_mobile_lcdcfb.h
sh7760fb.c
simplefb.c
skeletonfb.c
sm501fb.c
sm712.h
sm712fb.c video: fbdev: sm712fb: Fix crash in smtcfb_write() 2022-04-08 14:40:36 +02:00
smscufx.c video: fbdev: smscufx: Fix null-ptr-deref in ufx_usb_probe() 2022-04-08 14:40:06 +02:00
ssd1307fb.c
sstfb.c
sticore.h parisc/stifb: Keep track of hardware path of graphics card 2022-06-09 10:20:49 +02:00
stifb.c parisc/stifb: Implement fb_is_primary_device() 2022-06-09 10:20:47 +02:00
sunxvr500.c
sunxvr1000.c
sunxvr2500.c
tcx.c
tdfxfb.c
tgafb.c
tmiofb.c
tridentfb.c
udlfb.c video: fbdev: udlfb: properly check endpoint type 2022-05-09 09:05:00 +02:00
uvesafb.c
valkyriefb.c
valkyriefb.h
vesafb.c
vfb.c
vga16fb.c video: vga16fb: Only probe for EGA and VGA 16 color graphic cards 2022-01-20 09:17:50 +01:00
vt8500lcdfb.c
vt8500lcdfb.h
vt8623fb.c
w100fb.c video: fbdev: w100fb: Reset global state 2022-04-08 14:40:33 +02:00
w100fb.h
wm8505fb_regs.h
wm8505fb.c
wmt_ge_rops.c
wmt_ge_rops.h
xen-fbfront.c
xilinxfb.c