16 ms·
That is an extremely uncharitable reading of what he wrote, and I don't think it captures the essence of his intent at all. He said: > Well, there are tools th
by kbenson 11y ago
That is an extremely uncharitable reading of what he wrote, and I don't think it captures the essence of his intent at all. He said:
> Well, there are tools that actually want to write it.
It needs to be accessible in some manner.
> The ability to hose a system is certainly reason enought to make sure it's well protected and only writable to root.
Agreement it needs to be guarded, because it's a problem if it can hose a system.
> But beyond that: root can do anything really.
This is a truism for Unix, and altering this is much more of a problem than the occasional bricked machine. This is free software, and the ability to use it to control our hardware to the fullest extent possible is part of that freedom. Root cannot and should not be restricted from doing what it needs. It can, have hurdles put in place to make it harder to accidentally do something it doesn't mean to do though.
So, agreement on the problem, and agreement that something needs to be done to fix it, and a caution that access can't be entirely closed off without consequences, so root needs access. What's so horrible about that?
- deathanatos 11y agoNot only is root root, and should be permitted to access and modify the system as desired, it seems to me that the root of this problem is that motherboard manufacturers are shipping faulty boards. I shouldn't be able to brick my motherboard from my operating system, and that I can is a bug. You're telling me there isn't so much as a factory reset on these boards? Perhaps systemd could shield users from their motherboard's manufacturer's stupidity, but the amount of flack being received doesn't seem warranted; has the same amount of outrage been directed towards the manufacturers?
- michaelmrose 11y agoFixing every vendors implementation is an impossible task. Ensuring that the default configuration can't brick your motherboard is an easy one. So do the easy thing to ensure user safety WHILE working to solve the hard one to the extent feasible. Robust systems must work in the real world not just in an ideal one.
- pdkl95 11y agoIt is true that this is ultimately a hardware/firmware problem, but if the solution is waiting for motherboard manufacturers to not have bugs or stupid designs, then we will be waiting forever. Badly designed hardware will always exist. If you look at how probing for hardware works in the Linux kernel, quite a few older drivers (and the occasional feature subtree) have auto-probing disabled by default because it tended to crash some types of hardware. You see this again in lm_sensors, where the auto-probe script specifically asks permission (with a default "no") before it tries certain probes that risk crashing the hardware. We don't see this as much in recent years as hardware has gotten better - listing the device_ids/vendor_ids on a buss is much safer than poking ISA IO ports - but the problem remains. Some hardware needs special hand-holding, especially in the initial probe or initialize stages. Hence, tools that handle those stages are always going to have special cases and other annoyances. > the amount of flack being received doesn't seem warranted The flack against Pottering (and the rest of the systemd cabal) is because this isn't the first time his idealism has caused serious problems for others. Yes, it would be nice if we could just mount UEFI areas (or anything else). In reality, as this bug shows, this is dangerous behavior. It should have been made optional, or the entire idea of exposing those UEFI areas as a filesystem should have been reconsidered - a special purpose tool that handled bugged hardware might have been more appropriate.
- clinta 11y agoWe've been living in a world where you couldn't brick the firmware from the OS for a long time, and it's been terrible. I'm perfectly happy to take the risk of being able to brick a board from the OS if it means I never again have to try boot to a dos disk and run a proprietary exe to update the BIOS. Some boards do have something of a "factory reset" in the form of dual bios so that if one is bricked, the backup can still be booted. But it's not a bug that not every motherboard has this feature.
- Sophira 11y agoThe point isn't that it can be bricked; it's that it's possible to brick it via an "rm". Or heck, doing anything hardware-related via an 'rm'. The UNIX philosophy of "everything is a file" has always been based around the conceptual 'contents' of these 'files'. The kernel doesn't (directly) care if you remove a device node (block or character-based), it doesn't care if you remove a pipe, and it doesn't care if you remove a socket - even though all of these things are interfaces to the kernel in one form or another. Removing these files only removes your ability to access that interface. Simiarly with files in /proc - which, like /sys, is directly exported by the kernel. In many cases the kernel refuses to even allow you to unlink the 'files' in /proc, even when it might make sense. (For example, you can't kill a process by 'rm'ing anything in the relevant /proc directory.) Instead, you update the configuration values that the files in /proc represent by echoing into their contents, where applicable. The case with the efivars 'file' actually causing the kernel to take action when it's removed is what's at issue here. The fact that it happens to brick some computers is particularly unfortunate, but does a good job with showing the problem here. This isn't what the "everything is a file" philosophy is about.
- clinta 11y agoI was not defending SystemD, I was defending the hardware manufacturers against the accusation that they're "shipping faulty boards". I think SystemD is in the wrong here. Operating Systems should be protecting users from bricking their hardware. Harware manufacturers should not be shipping hardware that's nearly impossible to brick, because it results in hardware that is nearly impossible to update.
- snuxoll 11y ago> You're telling me there isn't so much as a factory reset on these boards? Quite a few boards have a backup EEPROM to initialize from if the primary EEPROM fails to boot, but who knows if those that do will bother to reinitialize the UEFI variables stored in NVRAM. Honestly, since they are just supposed to be stored in NVRAM what happens if your board battery runs out of juice, will it still brick?
- michaelmrose 11y agoNobody is saying root shouldn't be able to access such functionality but rather it just shouldn't be mounted rw by default. This is actually fairly uncomplicated.
- microcolonel 11y agoThe point is that that would offer no benefit. A root user can just mount it rw again in a single call.
- pjmlp 11y agoSo in a similar vein, why bother with alias rm='rm -i' at all?
- Ao7bei3s 11y agoBut that doesn't actually exist by default, and so it's not a good example. A better example is that `/` is a special case for `rm`. (Besides: I'm not a fan of `rm -i`, precisely because it's non-default. You'll get used to it, and then someday you accidentally some files on a system where you didn't add the alias.)
- pjmlp 11y agoLots of GNU/Linux distributions used to it by default, has it changed?
- Ao7bei3s 11y agoNone I currently use (just tested with bash* on: Debian, Centos, Fedora, OpenWRT) or have used in the past few years (Arch) has it. I don't remember anything about my time with SUSE and Ubuntu, thats way back. * I normally use zsh with grmlzshrc and nearly no customization (which is why I love grmlzshrc -- usable defaults), which warns for `rm -rf foo/*` but not for `rm -rf foo`.
- LeoPanthera 11y agoI agree with everything you wrote, but he did close the issue, which generally implies "I'm not going to do anything about it". Maybe it's not his responsibility and distro creators need to protect it, I don't know.
- mmsmatt 11y agoHe who play in root, kill tree. -Slackware fortune file
- Sanddancer 11y agoRoot needs access, but creating a pseudo-filesystem to access an area of the system with metadata, etc that doesn't map well to a filesystem, especially given the number of very buggy implementations of UEFI out there is just asking for trouble. There are properties that have settings to be visible only certain times during the boot process, there are settings that involve changing guids, etc. Access is better served through tools that better understand UEFI's confusing properties, not hammered at with general filesystem-level tools.
- snuxoll 11y agoI agree with you, but then we delve into the fun of needing to implement a syscall for this or a something in sysfs that limits the damage that can be done. I suppose it's better than the current efivars filesystem, but neither is a wonderful solution when we have to limit access to the hardware that could potentially do useful things (without patching the kernel, of course).
- Sanddancer 11y agoIt's useful, yes, but because of the buggy implementations out there, the risk in bricking, wanton removal of important variables, etc, is just too great. If anything, it should be a device node or the like. /dev/efi makes a lot more sense given its structure and purpose than trying to abstract it into looking kinda sorta like a filesystem.
- snuxoll 11y agoMy big problem at the end of the day is while we can help prevent users from killing their own boards - we still NEED to be holding these firmware vendors accountable. No matter what abstraction is presented to user space once someone has root on my system they could potentially destroy my hardware. Maybe one there is some nasty Windows Virus out there that fries boards by deleting EFI variables these stupid vendors will get their shit in order.
- eeZi 11y agoIf they changed it to "ro" by default, people would complain as well if it breaks something.
- bigbugbag 11y agoHosing a system is a way different than bricking a motherboard. Hosing a system is something that can be fixed by root by reinstalling from scratch or restoring from backup. Bricking hardware is not something a sysadmin can fix by himself. Poettering attitude refusing to acknowledge his mistakes and fixing them is not something new. Someone who doesn't get the difference between deleting the content of a drive and rendering hardware inoperable shouldn't be in charge of a critical system component.