Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1562707

Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for all VGA consoles

From Greg KH <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for all VGA consoles
Date 2017-01-19 14:30 +0100
Message-ID <t1kWS-23z-29@gated-at.bofh.it> (permalink)
References <sYria-7uK-19@gated-at.bofh.it> <sZgkF-5dS-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, Jan 13, 2017 at 09:07:57PM +0100, Manuel Schölling wrote:
> Add a scrollback buffers for each VGA console. The benefit is that
> the scrollback history is not flushed when switching between consoles
> but is persistent.
> The buffers are allocated on demand when a new console is opened.
> 
> This breaks tools like clear_console that rely on flushing the
> scrollback history by switching back and forth between consoles
> which is why this feature is disabled by default.
> Use the escape sequence \e[3J instead for flushing the buffer.
> 
> Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de>
> Reviewed-by: Andrey Utkin <andrey_utkin@fastmail.com>
> Tested-by: Andrey Utkin <andrey_utkin@fastmail.com>
> Tested-by: Adam Borowski <kilobyte@angband.pl>
> ---
>  drivers/video/console/Kconfig  |  25 +++++++-
>  drivers/video/console/vgacon.c | 142 ++++++++++++++++++++++++++---------------
>  2 files changed, 111 insertions(+), 56 deletions(-)
> 
> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
> index c3f1fb9ee820..f500e58f7636 100644
> --- a/drivers/video/console/Kconfig
> +++ b/drivers/video/console/Kconfig
> @@ -43,9 +43,28 @@ config VGACON_SOFT_SCROLLBACK_SIZE
>         range 1 1024
>         default "64"
>         help
> -         Enter the amount of System RAM to allocate for the scrollback
> -	 buffer.  Each 64KB will give you approximately 16 80x25
> -	 screenfuls of scrollback buffer
> +	  Enter the amount of System RAM to allocate for scrollback
> +	  buffers of VGA consoles. Each 64KB will give you approximately
> +	  16 80x25 screenfuls of scrollback buffer.
> +
> +config VGACON_SOFT_SCROLLBACK_PERSISTENT
> +	bool "Persistent Scrollback History for each console"
> +	depends on VGACON_SOFT_SCROLLBACK
> +	default n
> +	help
> +	  Say Y here if the scrollback history should persist when switching
> +	  between consoles. Otherwise, the scrollback history will be flushed
> +	  each time the console is switched.
> +
> +	  This feature might break your tool of choice to flush the scrollback
> +	  buffer, e.g. clear(1) will work fine but Debian's clear_console(1)
> +	  will be broken, which might cause security issues.
> +	  You can use the escape sequence \e[3J instead if this feature is
> +	  activated.

This issue is the one that makes me the most worried.  Why doesn't
clear_console() work anymore?  Why doesn't it use \e[3J ?

thanks,

greg k-h

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Greg KH <gregkh@linuxfoundation.org> - 2017-01-19 14:30 +0100
  Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Manuel Schölling <manuel.schoelling@gmx.de> - 2017-01-19 17:20 +0100
    Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Greg KH <gregkh@linuxfoundation.org> - 2017-01-19 17:50 +0100
      Bug#845177: [PATCH v10 3/4] console: Add persistent scrollback buffers for all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2017-01-20 00:10 +0100
        Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2017-01-20 14:20 +0100
          Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Greg KH <gregkh@linuxfoundation.org> - 2017-01-20 14:40 +0100
            Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2017-01-20 15:30 +0100
    Re: [PATCH v10 3/4] console: Add persistent scrollback buffers for  all VGA consoles Adam Borowski <kilobyte@angband.pl> - 2017-01-19 20:20 +0100

csiph-web