From owner-svn-src-all@FreeBSD.ORG Tue Aug 5 00:04:09 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E70074E0; Tue, 5 Aug 2014 00:04:09 +0000 (UTC) Received: from mail105.syd.optusnet.com.au (mail105.syd.optusnet.com.au [211.29.132.249]) by mx1.freebsd.org (Postfix) with ESMTP id A85162F63; Tue, 5 Aug 2014 00:04:09 +0000 (UTC) Received: from c122-106-147-133.carlnfd1.nsw.optusnet.com.au (c122-106-147-133.carlnfd1.nsw.optusnet.com.au [122.106.147.133]) by mail105.syd.optusnet.com.au (Postfix) with ESMTPS id ABD851040B2E; Tue, 5 Aug 2014 10:03:59 +1000 (EST) Date: Tue, 5 Aug 2014 10:03:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: John Baldwin Subject: Re: svn commit: r269474 - in head: share/man/man4 sys/dev/vt In-Reply-To: Message-ID: <20140805091730.N2827@besplex.bde.org> References: <53de340e.52ce.7073778e@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=eojmkOZX c=1 sm=1 tr=0 a=7NqvjVvQucbO2RlWB8PEog==:117 a=PO7r1zJSAAAA:8 a=9sZAoq1AbeMA:10 a=252g7Ztp5P0A:10 a=kj9zAlcOel0A:10 a=JzwRw_2MAAAA:8 a=6I5d2MoRAAAA:8 a=XOorSdqQf1jApBK8IO4A:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 Cc: svn-src-head@freebsd.org, Aleksandr Rybalko , src-committers@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Aug 2014 00:04:10 -0000 On Mon, 4 Aug 2014, John Baldwin wrote: > On Aug 3, 2014, at 6:07 AM, Aleksandr Rybalko wrote: > >> Log: >> Allow to disable some special key combinations handled by vt(4), like debug >> request, reboot request. >> >> Requested by: Claude Buisson >> >> Sponsored by: The FreeBSD Foundation > > I realize the API uses 'SPCL' as an abbreviation, but for user-facing things like a sysctl and tunable, I think it might be better to spell it out as "specialkeys" instead? It is a bad name, and also gratuitously different from syscons where the names are: hw.syscons.kbd_reboot hw.syscons.kbd_debug hw.syscons.sc_no_suspend_vtswitch The namespace seems to be more organized than syscons'. It seems to share other configuration bugs with syscons. Debugger entry is gated by debug.kdb.break_to_debugger and debug.kdb.alt_break_to_debugger. There are too many compile-time options to give defaults for the sysctls, but not enough to give usable ones. BREAK_TO_DEBUGGER) is misused to give the default for debug.kdb.break_to_debugger. The BREAK in it means a serial line break and is only indirectly related to breakpoint instructions or breaking into the debugger. Entering the debugger on serial line breaks is usually unwanted, since they happen when a serial console is unplugged, so BREAK_TO_DEBUGGER should rarely be configured. Misusing it to control the sysctl gives a wrong configuration for debugger entry from vt's when it is correctly configured to off. debug.kdb_alt_break_to_debugger defeats the vt sysctls in another way. It gives another way to enter the debugger, and due to the reboot misfeature in it, it also gives another way to reboot. It is correct but confusing for vt's to have per-device options for controlling debugger support. You might have a multiple consoles with only some secure enough to debug on. Serial consoles need per-device options even more, but have less than one -- the old global serial device options are abused for kdb defaults. So only the combination of an insecure vt with a secure serial console is supported -- you have to enable the global options to get any debugger support so can't do this if you have a secure vt and an insecure serial console. Bruce