From: Helge Deller <deller@kernel.org>
To: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
Henri Roosen <henri.roosen@ginzinger.com>
Subject: [PATCH v3] fbcon: Don't drop last logo line if logo is same size as screen
Date: Fri, 20 Nov 2026 20:16:59 +0100 [thread overview]
Message-ID: <awCcqwVKi_n0KMhi@carbonx1> (raw)
Henri reported a regression that when a custom bootlogo is exactly as
big as the screen, a white bar with the size of the font height is
displayed at the bottom of the display.
This patch fixes this off-by-one bug, but now -as sashiko-bot noticed-
since the logo covers the whole screen there is no area left in which
the text can be scrolled. To avoid accesses outside the screen memory
simply keep the text area covering the full screen (and possibly
overwriting) the full-screen logo.
Fixes: 94e6a058b168 ("fbcon: Fix KASAN slab-out-of-bounds Read in fbcon_prepare_logo")
Tested-by: Henri Roosen <henri.roosen@ginzinger.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org # v7.3+
---
v2: first sashiko-bot fixes
v3: sashiko-bot noticed another problem that screen gets cleared on full screen logo
diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
index d7890e119dc7..e7240eeb8381 100644
--- a/drivers/video/fbdev/core/fbcon.c
+++ b/drivers/video/fbdev/core/fbcon.c
@@ -666,7 +666,7 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
logo_height = fb_prepare_logo(info, par->rotate);
logo_lines = DIV_ROUND_UP(logo_height, vc->vc_font.height);
logo_lines = min(logo_lines, rows);
- logo_lines = min(logo_lines, new_rows - 1);
+ logo_lines = min(logo_lines, new_rows);
if (logo_lines <= 0) {
logo_lines = 0;
logo_shown = FBCON_LOGO_DONTSHOW;
@@ -734,7 +734,9 @@ static void fbcon_prepare_logo(struct vc_data *vc, struct fb_info *info,
pr_info("fbcon: disable boot-logo (boot-logo bigger than screen).\n");
} else {
logo_shown = FBCON_LOGO_DRAW;
- vc->vc_top = logo_lines;
+ /* keep vc_top if logo covers whole screen */
+ if (logo_lines < vc->vc_bottom)
+ vc->vc_top = logo_lines;
}
}
#endif /* MODULE */
@@ -2269,7 +2271,9 @@ static bool fbcon_switch(struct vc_data *vc)
logo_shown = fg_console;
fb_show_logo(info, par->rotate);
- update_region(vc,
+ /* avoid screen update on full screen sized logo */
+ if (vc->vc_top)
+ update_region(vc,
vc->vc_origin + vc->vc_size_row * vc->vc_top,
vc->vc_size_row * (vc->vc_bottom -
vc->vc_top) / 2);
reply other threads:[~2026-11-20 19:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=awCcqwVKi_n0KMhi@carbonx1 \
--to=deller@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=henri.roosen@ginzinger.com \
--cc=linux-fbdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox