Received: by 2002:ac0:aa62:0:0:0:0:0 with SMTP id w31-v6csp3610716ima; Tue, 23 Oct 2018 08:30:57 -0700 (PDT) X-Google-Smtp-Source: AJdET5eCngWMDBJFozmy+JSWOyUME2WV2M5wBcCgVZBwiRmj+T9eaZjKV8AvbpLeiQXso4BIVCtK X-Received: by 2002:a63:fc22:: with SMTP id j34-v6mr13457928pgi.434.1540308657133; Tue, 23 Oct 2018 08:30:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540308657; cv=none; d=google.com; s=arc-20160816; b=DMXes0oTHl9n7CqlxDBt+u0MdNAeL/cxivaMjiAF0nddzZ6KdlNN5xdDrFemBi6xcR mJSG3zMuByxy1E69XEwydZXSQRvPRxckwPNWVV36spvP8e3L0IoDANhke+7OMfjAdFvY Ot4UEbaxRviXzXnz2Y9kNEEMWe/GgTYmC9GI6eQkMaDWfjzJRsHM4qVxmRJDd4Flpb9W lRC93mnTh+MMiJ86tRIiUnCrMggNKUjvSs++9L5FsYakYQNdbK9AoFO2zNf/AfJrKPdu wfGrYBj2yi2beduCscxPq9ZJtUm/hqZsYuGBu3fwvCwdI+piwVHAqbFoDRQaE26y1wTf FcIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date; bh=8MZnzSaHgoXI83S2vr1KSWgAOTvRKIpqCf+by+gQVto=; b=pl4713WjUG9/pUeW9SnZFxzh6spMu8eOGCSgBBy3qPagFrUhLD38ZuP24gIrKfBh7P Ny7SkKdJvwuYBdeRL2ZF+UuqOgWTSbg2KbsTQvq2o1rasLN2xgLQBytZ2KPFG2RI2pyb Afw2xcJxkD2KFNVP+BGv+1jcChSJxgZ8S2S6xvw7NfaLrOtJH2EzDcHO2E/aqz3H579g 4HLSUQfuI23Nof90Ox6uURbuJ1+urACM3rBKKqGdtovBcHC/7Fd1o39BfG77a8QqfX2/ B+gPcAu1uR6Hy8USJYL5uwtgng3WR1GhkOU4pBVmccOTInazKuGGKx8a7hTi7/XWz57x YLrA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g20-v6si1432948plq.192.2018.10.23.08.30.41; Tue, 23 Oct 2018 08:30:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728252AbeJWXwW (ORCPT + 99 others); Tue, 23 Oct 2018 19:52:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51442 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbeJWXwW (ORCPT ); Tue, 23 Oct 2018 19:52:22 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 09DD9307C941; Tue, 23 Oct 2018 15:28:30 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BBC90604CC; Tue, 23 Oct 2018 15:28:29 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id w9NFSTIq021328; Tue, 23 Oct 2018 11:28:29 -0400 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id w9NFSS7J021324; Tue, 23 Oct 2018 11:28:28 -0400 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Tue, 23 Oct 2018 11:28:28 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Greg Kroah-Hartman , Nicolas Pitre cc: Dave Mielke , Adam Borowski , Jiri Slaby , linux-kernel@vger.kernel.org Subject: [PATCH] vt: fix broken display when running aptitude Message-ID: User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Tue, 23 Oct 2018 15:28:30 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If you run aptitude on framebuffer console, the display is corrupted. The corruption is caused by the commit d8ae7242. The patch adds "offset" to "start" when calling scr_memsetw, but it forgets to do the same addition on a subsequent call to do_update_region. Signed-off-by: Mikulas Patocka Fixes: d8ae72427187 ("vt: preserve unicode values corresponding to screen characters") Cc: stable@vger.kernel.org # 4.19 --- drivers/tty/vt/vt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Index: linux-2.6/drivers/tty/vt/vt.c =================================================================== --- linux-2.6.orig/drivers/tty/vt/vt.c 2018-10-23 16:15:08.000000000 +0200 +++ linux-2.6/drivers/tty/vt/vt.c 2018-10-23 16:29:20.000000000 +0200 @@ -1551,7 +1551,7 @@ static void csi_K(struct vc_data *vc, in scr_memsetw(start + offset, vc->vc_video_erase_char, 2 * count); vc->vc_need_wrap = 0; if (con_should_update(vc)) - do_update_region(vc, (unsigned long) start, count); + do_update_region(vc, (unsigned long)(start + offset), count); } static void csi_X(struct vc_data *vc, int vpar) /* erase the following vpar positions */