All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] vt: Fix secure clear screen
@ 2014-02-06 20:01 Petr Písař
  2014-02-14 10:39 ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Petr Písař @ 2014-02-06 20:01 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, Jean-François Moine, Petr Písař

\E[3J console code (secure clear screen) needs to update_screen(vc)
in order to write-through blanks into off-screen video memory.

This has been removed accidentally in 3.6 by:

commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c
Author: Jean-François Moine <moinejf@free.fr>
Date:   Thu Sep 6 19:24:13 2012 +0200

    tty vt: Fix line garbage in virtual console on command line edition

Signed-off-by: Petr Písař <petr.pisar@atlas.cz>
---
 drivers/tty/vt/vt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 61b1137..23b5d32 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -1164,6 +1164,8 @@ static void csi_J(struct vc_data *vc, int vpar)
 			scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char,
 				    vc->vc_screenbuf_size >> 1);
 			set_origin(vc);
+			if (CON_IS_VISIBLE(vc))
+				update_screen(vc);
 			/* fall through */
 		case 2: /* erase whole display */
 			count = vc->vc_cols * vc->vc_rows;
-- 
1.8.5.3


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

* Re: [PATCH] vt: Fix secure clear screen
  2014-02-06 20:01 [PATCH] vt: Fix secure clear screen Petr Písař
@ 2014-02-14 10:39 ` Pavel Machek
  2014-02-14 14:22   ` Greg Kroah-Hartman
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2014-02-14 10:39 UTC (permalink / raw)
  To: Petr Písař
  Cc: linux-kernel, Greg Kroah-Hartman, Jean-François Moine

Hi!

> \E[3J console code (secure clear screen) needs to update_screen(vc)
> in order to write-through blanks into off-screen video memory.

I guess it is also suitable for stable, right?

Thanks,
								Pavel

> This has been removed accidentally in 3.6 by:
> 
> commit 81732c3b2fede049a692e58a7ceabb6d18ffb18c
> Author: Jean-François Moine <moinejf@free.fr>
> Date:   Thu Sep 6 19:24:13 2012 +0200
> 
>     tty vt: Fix line garbage in virtual console on command line edition
> 
> Signed-off-by: Petr Písař <petr.pisar@atlas.cz>
> ---
>  drivers/tty/vt/vt.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index 61b1137..23b5d32 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -1164,6 +1164,8 @@ static void csi_J(struct vc_data *vc, int vpar)
>  			scr_memsetw(vc->vc_screenbuf, vc->vc_video_erase_char,
>  				    vc->vc_screenbuf_size >> 1);
>  			set_origin(vc);
> +			if (CON_IS_VISIBLE(vc))
> +				update_screen(vc);
>  			/* fall through */
>  		case 2: /* erase whole display */
>  			count = vc->vc_cols * vc->vc_rows;

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

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

* Re: [PATCH] vt: Fix secure clear screen
  2014-02-14 10:39 ` Pavel Machek
@ 2014-02-14 14:22   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-02-14 14:22 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Petr Písař, linux-kernel, Jean-François Moine

On Fri, Feb 14, 2014 at 11:39:30AM +0100, Pavel Machek wrote:
> Hi!
> 
> > \E[3J console code (secure clear screen) needs to update_screen(vc)
> > in order to write-through blanks into off-screen video memory.
> 
> I guess it is also suitable for stable, right?

I've already marked it as such in my tree.

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

end of thread, other threads:[~2014-02-14 14:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-06 20:01 [PATCH] vt: Fix secure clear screen Petr Písař
2014-02-14 10:39 ` Pavel Machek
2014-02-14 14:22   ` Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.