lkml.org 
[lkml]   [1997]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectEmergency shutdown feature
> mike> Or you could plug in elcheapo joystick and run "shutdown -r now" when
> mike> both buttons are pressed for more than 5 seconds.

Such a pattern runs the risk of being activated when someone actually
_uses_ the joystick for games. :-) But I can imagine some keyboard
tricks that are rather unlikely to be triggered by accident.

> I know that gpm can be setup to do this...

and init can react to key combinations too. The problem is that these are
user processes, and they won't get a chance when the scheduler is hosed.
(Which can happen with such trivial mistakes as a process running SCHED_RR
in an endless loop.) An emergency reboot like this has to be in the kernel,
called from some interrupt.

I sometimes wanted a simple emergency reboot activated over the network.
This would supposedly be rather easy to implement. I'm thinking about the
following: a datagram has to be received (via IP is most convenient I think)
with a special type which contains e.g. the target host name and current
system time in 10 seconds granularity (to allow for clock fuzz) signed with
a secret key (MD5 suffices). The feature is activated by writing this key
into a /proc/sys entry. The cryptographic setup is to prevent trivial DOS
attacks, and this way the feature has to be activated explicitly.

(Coding a "client" for that is left as an exercise :-)

olaf

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.726 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site