Files
kernel_xiaomi_sm8250/include/linux
Helge Deller 54eaaac622 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: Hugo SIMELIERE <hsimeliere.opensource@witekio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-09-04 13:13:08 +02:00
..
2024-02-23 08:12:39 +01:00
2022-10-26 13:19:32 +02:00
2023-08-08 19:49:17 +02:00
2023-12-20 15:38:01 +01:00
2021-12-08 08:50:13 +01:00
2024-04-13 12:50:14 +02:00
2021-01-30 13:32:12 +01:00
2021-05-22 10:59:50 +02:00
2022-10-26 13:19:35 +02:00
2021-03-04 09:39:44 +01:00
2022-08-25 11:15:23 +02:00
2021-02-07 14:48:38 +01:00
2019-12-31 16:35:38 +01:00
2023-09-23 10:47:59 +02:00
2021-06-30 08:48:18 -04:00
2023-06-21 15:39:57 +02:00
2023-02-22 12:47:17 +01:00
2023-11-28 16:46:33 +00:00
2023-10-25 11:16:20 +02:00
2023-10-25 11:16:20 +02:00
2021-12-14 10:18:04 +01:00
2020-04-02 15:28:22 +02:00
2024-07-05 09:00:35 +02:00
2024-02-23 08:12:39 +01:00
2020-04-02 15:28:23 +02:00
2021-12-14 10:18:06 +01:00