Hacker News new | ask | show | jobs
by mikeash 4504 days ago
In what scenario can userland code send signals that will physically damage storage devices?
1 comments

Over my long career (approaching 40 years) I've seen any number of peripheral devices that responded to bad instructions by tearing themselves to pieces. One example would be a HDD driver that inadvertently ordered the R/W heads to move to a nonexistent location. That's pretty common, and sometimes results from a bug in the code, not anyone's intention.

Another common error is to allow a system power shutdown without parking the HDD R/W heads in a sacrificial area, so subsequent mechanical shocks won't cause the heads to collide with a legitimate data surface. This problem can be caused by insufficient power supply capacity -- a capacity that must detect the power shutdown and allow the head traversal to complete before the remaining power is used up.

Just examples, there are many similar ones.

I think you may have missed the word "userland", because neither example should be possible outside the kernel.