diff options
| author | Helge Deller <deller@gmx.de> | 2025-08-02 21:34:37 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-08-28 16:28:33 +0200 |
| commit | 820949bbf33f3e8892c90c772a52f4082ea8d8f0 (patch) | |
| tree | 330e4a381e30ba1522c9d158dea6e29a635f278b /drivers/video | |
| parent | 5858448a6c65d8ee3f8600570d3ce19febcb33be (diff) | |
| download | linux-820949bbf33f3e8892c90c772a52f4082ea8d8f0.tar.gz linux-820949bbf33f3e8892c90c772a52f4082ea8d8f0.tar.bz2 linux-820949bbf33f3e8892c90c772a52f4082ea8d8f0.zip | |
Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()"
commit e4fc307d8e24f122402907ebf585248cad52841d upstream.
This reverts commit 864f9963ec6b4b76d104d595ba28110b87158003.
The patch is wrong as it checks vc_origin against vc_screenbuf,
while in text mode it should compare against vga_vram_base.
As such it broke VGA text scrolling, which can be reproduced like this:
(1) boot a kernel that is configured to use text mode VGA-console
(2) type commands: ls -l /usr/bin | less -S
(3) scroll up/down with cursor-down/up keys
Reported-by: Jari Ruusu <jariruusu@protonmail.com>
Cc: stable@vger.kernel.org
Cc: Yi Yang <yiyang13@huawei.com>
Cc: GONG Ruiqi <gongruiqi1@huawei.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/console/vgacon.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index bbc362db40c5..14e5312a0030 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1139,7 +1139,7 @@ static bool vgacon_scroll(struct vc_data *c, unsigned int t, unsigned int b, c->vc_screenbuf_size - delta); c->vc_origin = vga_vram_end - c->vc_screenbuf_size; vga_rolled_over = 0; - } else if (oldo - delta >= (unsigned long)c->vc_screenbuf) + } else c->vc_origin -= delta; c->vc_scr_end = c->vc_origin + c->vc_screenbuf_size; scr_memsetw((u16 *) (c->vc_origin), c->vc_video_erase_char, |
