From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3681B252904; Tue, 26 Aug 2025 13:26:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756214814; cv=none; b=s5VYcuXetTHZxw2AjTfAL9M0VGOZL0yZkIAuP5HHIllLfMY5hdjo1gb/miegsTVlDmUgGHxvd4FlkXvF5BL1iaJQPUtUijPFgGFj3r4BfSe7J9qJmJJQsF2nETlI8D+N5pULnL6uCo8Xob3bf3HOREkspRCmKRZSf/ZOz+HyTgw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756214814; c=relaxed/simple; bh=4cV5jaP5pdY0mzomMceuNTzD/Nd7PAV9xAmhihNpgdQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Deg63EloMmokVuk3R2G34P7xNC2ds+jdySJbNS3MWmuR0L8k6lt1q+OVEazrNTB2tnXvWSUKomLOlW9CCEfLEX4HrUq50+Tg5fAXwmDVmw0xIec1PipYwau+iXCtkW4Du9ktsjhaVFhotWDMhIPit4Swsnj3W+GhrsO7H5P/GCU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=i4BG+47A; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="i4BG+47A" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BAA1BC4CEF1; Tue, 26 Aug 2025 13:26:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756214814; bh=4cV5jaP5pdY0mzomMceuNTzD/Nd7PAV9xAmhihNpgdQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i4BG+47AfMEQD/zuJIk75b+db8r4hdlJYR0BnhqHPcQwz5TczJcQ5jTmypR1xA4Ab e3Xj8OeIerZLWdW7KqI081H5MUcNFtyerbDEBkqTls2SsVZx52MKNZLDkIOOVmO68n ZrxVIOwTtXlK1ivvXSi6QqIuuq/bso8XJLkjU5Es= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Jari Ruusu , Yi Yang , GONG Ruiqi , Helge Deller Subject: [PATCH 6.1 278/482] Revert "vgacon: Add check for vc_origin address range in vgacon_scroll()" Date: Tue, 26 Aug 2025 13:08:51 +0200 Message-ID: <20250826110937.646792904@linuxfoundation.org> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250826110930.769259449@linuxfoundation.org> References: <20250826110930.769259449@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Helge Deller 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 Cc: stable@vger.kernel.org Cc: Yi Yang Cc: GONG Ruiqi Signed-off-by: Helge Deller Signed-off-by: Greg Kroah-Hartman --- drivers/video/console/vgacon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -1149,7 +1149,7 @@ static bool vgacon_scroll(struct vc_data 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,