5 ms·
NT has a neat feature for essential processes: you can tell the kernel, "if I ever exit, for whatever reason, panic the system and reboot immediately". There's
by quotemstr 11y ago
NT has a neat feature for essential processes: you can tell the kernel, "if I ever exit, for whatever reason, panic the system and reboot immediately". There's little room for error with a system like that. It wouldn't be that hard to implement this feature in Linux too.
(Of course, you need to have special privileges to mark your process as critical.)
- akx 11y agoI could see malware authors making use of that feature. Any documentation for it?
- seba_dos1 11y agoI suppose that if you have permissions to use that feature, you could already take the system down with millions of other ways.
- ultramancool 11y agohttps://msdn.microsoft.com/en-us/library/windows/desktop/aa373646%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... Of course, it's possible to excise such processes via patching or with a debugger.
- jschwartzi 11y agoIn Linux, if PID 1 ever goes down the kernel panics. You could put a watchdog in your PID 1 that will take it down if the timer isn't tickled for a certain period of time.
- cnvogel 11y agoEven better, explicitly request a fast reboot: "echo b >/proc/sysrq-trigger".
- andrewaylett 11y agoSystemd has a couple of nice features around this: init can open the hardware watchdog and ping it as required, so if init ever stops then the machine will reboot. At the same time, services can be set up to need to write to their own watchdog. So if a service dies, either init will notice and take appropriate action, or init will also have died and the hardware watchdog will reboot the system. Also -- and this has been useful to me on a laptop -- init will configure the watchdog as a last-resort to kill the system when shutting down.
- vezzy-fnord 11y agoThis can be done with a software watchdog: http://linux.die.net/man/8/watchdog http://linux.die.net/man/8/watchdog