All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/3] fbcon: fix rotated font buffer handling on font change
@ 2026-10-19  9:02 Yao Yiqi
  2026-10-19  9:02 ` [PATCH v4 1/3] fbcon: Include font geometry in the rotated font cache Yao Yiqi
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Yao Yiqi @ 2026-10-19  9:02 UTC (permalink / raw)
  To: deller, tzimmermann, simona
  Cc: dri-devel, linux-fbdev, linux-kernel, yaoyiqi3, Yao Yiqi

Fix out-of-bounds reads of the rotated font buffer when the console
font changes on a rotated console (fbcon=rotate:N). KDFONTOP installs
the new geometry and vc_resize() redraws before par->rotated.buf is
updated, so the old buffer is indexed with the new cell size.

Patch 1 keys the rotated font cache on the font geometry. Patch 2
rebuilds it on font changes, restoring the old buffer if the change
fails. Patch 3 retries a failed allocation.

Changes since v3: roll back via the saved buffer instead of re-running
rotate_font(), abort the font change on rebuild failure, and guard the
rotated state with CONFIG_FRAMEBUFFER_CONSOLE_ROTATION.

v1: https://lore.kernel.org/all/20261014085102.497789-1-yaoyiqi3@huawei.com/

Yao Yiqi (3):
  fbcon: Include font geometry in the rotated font cache
  fbcon: Rebuild rotated font buffer on font change
  fbcon: Retry rotated font allocation after failure

 drivers/video/fbdev/core/fbcon.c        | 50 +++++++++++++++++++++++++++++++++
 drivers/video/fbdev/core/fbcon.h        |  9 ++++---
 drivers/video/fbdev/core/fbcon_rotate.c | 10 +++++++-
 3 files changed, 65 insertions(+), 4 deletions(-)

-- 
2.56.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-10-19  9:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19  9:02 [PATCH v4 0/3] fbcon: fix rotated font buffer handling on font change Yao Yiqi
2026-10-19  9:02 ` [PATCH v4 1/3] fbcon: Include font geometry in the rotated font cache Yao Yiqi
2026-10-19  9:02 ` [PATCH v4 2/3] fbcon: Rebuild rotated font buffer on font change Yao Yiqi
2026-10-19  9:15   ` sashiko-bot
2026-10-19  9:02 ` [PATCH v4 3/3] fbcon: Retry rotated font allocation after failure Yao Yiqi
2026-10-19  9:15   ` sashiko-bot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.