News for hackers. Stuff that matters.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by kbenson on Monday February 22, 2016 @02:20PM (#11153479)
It's not a systemd bug, it was just exposed by systemd. This was what most everyone seemed to completely miss in the prior exchanges.

Another thing that was missed was that Lennart wasn't being unreasonable, nor was he saying it wasn't a problem (he specifically stated the opposite, in fact). I had a feeling at the time (based on his responses) that the reason he wasn't specifically stating he was going to fix it or open a bug report for it in systemd was that he was going to push it up-stack to a more appropriate place, and it looks like that's what happened.

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by eeZi on Monday February 22, 2016 @02:52PM (#11153716)
> Another thing that was missed was that Lennart wasn't being unreasonable, nor was he saying it wasn't a problem (he specifically stated the opposite, in fact). I had a feeling at the time (based on his responses) that the reason he wasn't specifically stating he was going to fix it or open a bug report for it in systemd was that he was going to push it up-stack to a more appropriate place, and it looks like that's what happened.

This. It's really hard to blame this on systemd (not that people didn't try anyway).

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by 5ilv3r on Monday February 22, 2016 @03:03PM (#11153819)
My bsd init and sysv init machines do not have this issue. They don't automount every damn filesystem they see at boot for no reason.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by ambrice on Monday February 22, 2016 @04:09PM (#11154317)
It seems to me like it's a bad thing that an accidental rm in an efivarfs filesystem can brick the system, regardless of whether the filesystem was automounted or not.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by EmanueleAina on Tuesday February 23, 2016 @04:54AM (#11157755)
Windows does not have this issue either.

But on sysvinit if you mount efivars rw for any reason and your hands slip a bit a stray `rm` could still brick your motherboard, so it's not really fair to say that without automounting the issue goes away.

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by captainmuon on Monday February 22, 2016 @02:47PM (#11153687)
I'd say it wasn't a bug in systemd's implementation, it was a bug in the design of systemd. Why require that evivarfs be mounted at runtime? You could easily make it so that it is only mounted at boot time if neccessary, or only when you run a tool that wants to write to EFI.

I'd expect file operations to only permanently affect storage devices per default. Sure you can mount almost anything as a file in Unix, but to automatically mount more than necessary is bad design. It's like placing mystery files in the filesystem, and when a curious user deletes or modifies them, they loose their monitor's color profile, there printer's firmware, or all of their GMail attachments. You could say it was the user's fault to mess with it, but I'd say it's weird to expose such things as files (unless explicitly asked for by the user or a tool).

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by sandGorgon on Monday February 22, 2016 @03:02PM (#11153810)
EVERY single init system mounts it's rw. It is not specific to systemd. There are lots of situations where EFI boot variables need to be set by the OS.

Systemd is as consistent as upstart in this.

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by Sanddancer on Monday February 22, 2016 @03:16PM (#11153922)
No. Sane operating systems don't present UEFI variables as a filesystem. Their structure, their contents, everything are not files. Period. efivarfs doesn't expose metadata regarding when variables are visible, does't expose any sort of interface to present a private key for managing secure variables, etc. It's just a bad, broken idea that should be completely removed.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by mjg59 on Monday February 22, 2016 @03:35PM (#11154072)
> does't expose any sort of interface to present a private key for managing secure variables

Nor does UEFI. The key is just provided as part of the SetVariable() payload.

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by the_mitsuhiko on Monday February 22, 2016 @03:43PM (#11154135)
> No. Sane operating systems don't present UEFI variables as a filesystem

Probably. But that's not systemd's fault.

Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by Sanddancer on Monday February 22, 2016 @05:54PM (#11155023)
The systemd developers could have said that they wanted no part of that madness, and chosen not to automatically mount it. Someone else's bad decision doesn't absolve one from their own bad decisions.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by cbd1984 on Monday February 22, 2016 @10:41PM (#11156340)
You're really looking for a way to blame systemd.
Re:Linux 4.5-rc5: efivarfs fixed to avoid “rm -rf /” brickin... by sandGorgon on Monday February 22, 2016 @10:21PM (#11156258)
I'm not qualified to comment on that - but this is the core of Linux: everything is a file.

You may want to call Linux as a crazy operating system , but then you are veering close to Godwins Law anyway.