by zzalpha · 10y ago · 0 comments
I actually find this line of thinking baffling... I don't remember the last time I actively chose to shutdown/reboot voluntarily. Spending time optimizing the boot sequence strikes me as a total waste of effort.
Modern computers support sleep and hibernate... why would anyone choose to reboot except to apply OS updates on certain operating systems that insist on a reboot?
I would much rather focus on uptime stability and flawless sleep/hibernate so we can encourage people to never reboot unless they're forced to.
That'd better serve phones, tablets, and other devices that share this infrastructure and need this capability, and it would cater to a public that is getting used to always-on, always-available technology.
The systemd devs have a thing about listening to the -sec community. You can see this in how while the Linux default is to treat namespace mounts at private, systemd mount them as shared unless told otherwise. This because the -sec people recommend it that way (allows a sysadmin to override mounts from outside the namespace, to avoid dos-ing apparently).
Then again they also have a bit of theater in them. For example they accepted a patch to lock the computer if a HID devices was plugged in. But while the original patch did it on any device, they modified it so that it only happens on the device ids of known mouse wigglers used in police computer seizure kits.
There was a series of two patches: one to logind to add a mechanism to tell all active user sessions to lock, and one to the udev rules provided with systemd to add a policy that plugging in a known mouse wiggler causes all active user sessions to lock.
(It wouldn't make any sense to lock the screen when inserting any HID device.)
Separately from that, logind also implements other policies for when to lock the screen, such as when closing a laptop lid without an external monitor connected.
The last security advisory affecting the linux kernel for Debian was 5 days ago (https://www.debian.org/security/2015/dsa-3426). There was another one about a month before that (https://www.debian.org/security/2015/dsa-3426).
Additionally because of the way shared libraries are loaded in Linux after you apply the patches you might have old, unpatched versions of (eg openssl) linked into currently running processes. There are a few ways to handle this but a restart is one very simple one that is guaranteed to work.
Consequently any Linux machine that has more than about a month of uptime is probably missing patches. 500 days of uptime corresponds to a huge number of unpatched vulnerabilities. So restarting is quite important and is unlikely to go away soon.
This idea that a restart is needed is Windows-style thinking.
> more than about a month of uptime is probably missing patches
Only when you don't know how to properly maintain a Linux box. A reboot is one way to handle patches. It is even recommended when you are changing anything related to the startup process.
For everything else, you simply need to restart any process using the old libs. If it wasn't a security patch, you can often simply wait for processes to finish normally.
I implied it but I didn't make it clear: debian's security team releases a kernel patch about once a month. This is where the ceiling on uptime comes from.
This is why I mentioned hibernation. Standby is ok only for a few hours at most on laptops.
It also puts the computer back into a known state, and gives you smaller PIDs/thread IDs/etc. again...