Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933903AbcKPRkb (ORCPT ); Wed, 16 Nov 2016 12:40:31 -0500 Received: from mout.gmx.net ([212.227.15.15]:50195 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933750AbcKPRk2 (ORCPT ); Wed, 16 Nov 2016 12:40:28 -0500 Message-ID: <1479318019.20980.12.camel@gmx.de> Subject: Re: [PATCH v3] console: Add persistent scrollback buffers for all VGA consoles From: Manuel =?ISO-8859-1?Q?Sch=F6lling?= To: Andrey Utkin Cc: plagnioj@jcrosoft.com, tomi.valkeinen@ti.com, jslaby@suse.cz, gregkh@linuxfoundation.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 16 Nov 2016 18:40:19 +0100 In-Reply-To: <20161110214748.GB26324@dell-m4800.home> References: <1474236417-27150-1-git-send-email-manuel.schoelling@gmx.de> <20161110214748.GB26324@dell-m4800.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:1ioPKtQ5JP1fSUF7SYBHG88HuHOJnStdIlzUgOqHhhLS4ktOGvS 9Izs+7IdquLmpXn74O5IppWcAe3fKaH5qMzZO/voujNGDwxVlEh8JFEzvpjLUL8MhW0jqzM RSFS35243XR7+D+Hsl5KdZatg9MwhKvUcAWQIKWa8aHL5shQMQ7IA40qebXWPvm4CcSLu+o QIhV9xE1Ar/ACo+Bl7rKw== X-UI-Out-Filterresults: notjunk:1;V01:K0:jxOyEtIfBSQ=:FiadAscPEebq4GEmZlupPy yimq+4X8yrk8FyBlYICK7n5L72r5i301KmWfrOfVEiIw4F1Yg/nr0fGkiRpVe71gPxDqykIzd 0ctzQthS2nTpNQPpLHu9M0BUmHG2fo6mwJ0SeOiDp9iFFZVLkQRkUBtoqDsC6TAhG96RxCKDQ 71KXV1XOUM7QFgKlNvncJy8HQ0Vy2p3b0m4hytmyVMNGG1LnVN/pWGL7zL2HfwiPH1uFbC7da B1ER4j0/k/2mBYH9n5dr/qNOQ2pQQuPiB220b+XW3/I03huvl25fGPqH+suGqwbs+uCOnqYwF rmMpDPbPflCaBABZfz7HrRNwdgCAh7D7b96pjH6oiXGRIlc9XwBSfwe8fgc3jIkJNDTf1i1Ug RAD6s+2Nasw8McBrjivLF68DgpkS+ouWkEtBzrNMUjF5FPt+AdNOm/BTmJGRMRU2JCoReSf9s ihu+QaaZE3e6sG8XUyHDVtt98NAgkgFonLtvFoz611Q4LKJc3iZKR4z8pHt/RArIwGGdYYfH/ 0StAbAW8qeniPUvg8vu0OT4fJy6Mxr1QhphW2eBcFh1Y0LIxvtJfF4XonH4QYgtMmE6M6RlXN LeqNI9Jqb2I7vjKtCRhF99tYICJrk/E1eA4ZQ94Eg3yTe+cc+bLNuLK2Rou3xZTW+PioAsVE0 FjpxVRW8rPmhX39WJAeNnnYPoUEAiVYFeEIy3QlQEeQeAhj6ZUest97wPiqYQAoaOrl6az9u5 3JlKB5aKAaBN1cP6U2XAFSXCJMiq8taAtlyHXzh2UDsETVFaVX5pjA+XgFfpxWvImHECpEkjR rTo8dVQ Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2311 Lines: 59 Hi, I finally found the time to rework the patches, but there are a few things I want to discuss: > > 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. > > Have never heard of such tool as clear_console. Why mention it at all, > where is it used, which are practical configurations which are broken in > this way? clear_console(1) is part of Debian's bash package and (I think) a inofficial 'downstream' patch developed by Ubuntu [1]. There has been security concerns (which is also why I disabled this feature by default). However, if there might be security issues, I would strongly suggest to keep this part in the documentation - it does no harm anyway, does it? > Does this break clear(1)? No, my tests with clear(1) worked fine. > > - 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. > > Indentation amended, I don't know which way it should be, please > double-check or mimic old indentation to stay on safe side. Double-checked! That's at least how I read the docs. > > +static struct vgacon_scrollback_info *vgacon_scrollback_cur; > > Could you use name vgacon_scrollback instead of new > vgacon_scrollback_cur? It doesn't change anything conceptually, but is a > bit shorter and seems to mean current scrollback context anyway, right? > > I think I see nothing to comment on below. There is a already an array called 'vgacon_scrollbacks[N]', so I would not like to have two variables named 'vgacon_scrollback' and 'vgacon_scrollbacks'. Either {'vgacon_scrollback_cur' and 'vgacon_scrollbacks'} or {'vgacon_scrollback' and 'vgacon_scrollback_list'}. You can make a suggestion, if you like. All other point you mentioned where fixed as you suggested. Thanks again for your help, Andrey! Best, Manuel [1] http://manpages.ubuntu.com/manpages/xenial/en/man1/clear_console.1.html