linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vt: fix broken display when running aptitude
@ 2018-10-23 15:28 Mikulas Patocka
  2018-10-23 15:47 ` Nicolas Pitre
  0 siblings, 1 reply; 4+ messages in thread
From: Mikulas Patocka @ 2018-10-23 15:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Nicolas Pitre
  Cc: Dave Mielke, Adam Borowski, Jiri Slaby, linux-kernel

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 <mpatocka@redhat.com>
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 */

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

* Re: [PATCH] vt: fix broken display when running aptitude
  2018-10-23 15:28 [PATCH] vt: fix broken display when running aptitude Mikulas Patocka
@ 2018-10-23 15:47 ` Nicolas Pitre
  2018-11-02 19:09   ` Nicolas Pitre
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2018-10-23 15:47 UTC (permalink / raw)
  To: Mikulas Patocka
  Cc: Greg Kroah-Hartman, Dave Mielke, Adam Borowski, Jiri Slaby, linux-kernel

On Tue, 23 Oct 2018, Mikulas Patocka wrote:

> 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 <mpatocka@redhat.com>
> Fixes: d8ae72427187 ("vt: preserve unicode values corresponding to screen characters")
> Cc: stable@vger.kernel.org	# 4.19

Good catch.

Reviewed-by: Nicolas Pitre <nico@linaro.org>

> ---
>  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 */
> 

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

* Re: [PATCH] vt: fix broken display when running aptitude
  2018-10-23 15:47 ` Nicolas Pitre
@ 2018-11-02 19:09   ` Nicolas Pitre
  2018-11-02 19:15     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 4+ messages in thread
From: Nicolas Pitre @ 2018-11-02 19:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Mikulas Patocka
  Cc: Dave Mielke, Adam Borowski, Jiri Slaby, linux-kernel

Greg, are you picking up this patch?

Would be nice to have in v4.19.1.

On Tue, 23 Oct 2018, Nicolas Pitre wrote:

> On Tue, 23 Oct 2018, Mikulas Patocka wrote:
> 
> > 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 <mpatocka@redhat.com>
> > Fixes: d8ae72427187 ("vt: preserve unicode values corresponding to screen characters")
> > Cc: stable@vger.kernel.org	# 4.19
> 
> Good catch.
> 
> Reviewed-by: Nicolas Pitre <nico@linaro.org>
> 
> > ---
> >  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 */
> > 
> 

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

* Re: [PATCH] vt: fix broken display when running aptitude
  2018-11-02 19:09   ` Nicolas Pitre
@ 2018-11-02 19:15     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-11-02 19:15 UTC (permalink / raw)
  To: Nicolas Pitre
  Cc: Mikulas Patocka, Dave Mielke, Adam Borowski, Jiri Slaby, linux-kernel

On Fri, Nov 02, 2018 at 03:09:14PM -0400, Nicolas Pitre wrote:
> Greg, are you picking up this patch?
> 
> Would be nice to have in v4.19.1.

4.19.1-rc1 is already out.  My queue is _huge_ give me some time to
catch up...

greg k-h

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

end of thread, other threads:[~2018-11-02 19:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-23 15:28 [PATCH] vt: fix broken display when running aptitude Mikulas Patocka
2018-10-23 15:47 ` Nicolas Pitre
2018-11-02 19:09   ` Nicolas Pitre
2018-11-02 19:15     ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).