svn commit: r269474 - in head: share/man/man4 sys/dev/vt

Bruce Evans brde at optusnet.com.au
Tue Aug 5 00:04:10 UTC 2014


On Mon, 4 Aug 2014, John Baldwin wrote:

> On Aug 3, 2014, at 6:07 AM, Aleksandr Rybalko <ray at FreeBSD.org> 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


More information about the svn-src-all mailing list