Closed RussianNeuroMancer closed 5 years ago
Right. The user needs to be very careful about deleting unknown files/partitions.
However, this is not something we plan on changing ourselves.
Leaving this open to create some awareness, but AFAIC it's not a bug.
Look at this from this point of view: by leaving hardware internals open for damage from userspace, driver create security vulnerability that allow to brick hardware, like Chernobyl did ("highly destructive to vulnerable systems, overwriting critical information on infected system drives, and in some cases destroying the system BIOS").
Also please pay attention to the fact that mounting partitions from screenshot doesn't even require root privileges and bricking motherboard or it's component can be done even without privileges escalation.
Another example, buggy software that destroy data in worst case scenario (example) in this case will brick motherboard or it's components.
Leaving hardware internals open for damage from userspace is just too dangerous. With all respect, please, reconsider.
Would you like to propose a solution?
Patches always welcome. :smiley:
Would you like to propose a solution?
Is ufshcd-qcom could distinguish main/first/biggest block device from UFS storage from the rest block devices on UFS that contain service partitions? Maybe hide other block devices besides main/first/biggest by default if device boot via ACPI (as I understand eventually this laptops will boot via ACPI instead of DT, right?) but expose them (with warning message on driver loading) if device boot via DeviceTree or if kernel parameter was set by user (maybe something like "ufshcd-qcom.unhide_qcom_firmware=1" or any other name) is specified? What you think?
Patches always welcome.
I wish I would know how to propose solution not in the wall of text but with actually working implementation. Unfortunately at this point my knowledge is limited to stuff like this.
P.S. Sorry for several e-mail notifications that was probably sent by GitHub every time I corrected my previous message in this bugreport.
There is no way of doing this at the kernel level, since it cannot reliably differentiate between partitions which must be visible to the user and ones which should not. The UFS kernel driver's responsibility is to provide access to the UFS device by 'driving' the hardware device, not to provide superficial limitations based on what data is stored on the various partitions. Hiding critical partitions would have to be controlled at the userspace level if at all.
This project is designed solely to help consumers bootstrap Linux on these devices, agnostic to distribution. It is not a distribution itself, nor does it govern how users operate their devices. Some of the consumers of this project might wish to access the various firmwares in order to add support for the available devices the machine supports.
I will go one stage further than just leaving this issue open by supplying a warning in the README.md
, but that is as far as we will go.
Project warning documentation: https://github.com/aarch64-laptops/build/commit/3fc3cde379fe02cb4b039f3c790e0289c6784e33
Hello!
(Ignore sdh, it's microSD I use to boot system.)
As you can see on screenshot below some partitions from list above is even available for mounting in Nautilus:
I'm afraid editing files on these devices (besides sda) or wrong device in dd command could cause grave consequences for motherboard. I don't know if my fear is justified, but if it's possible to brick motherboard, LTE modem or any other component by editing or removing files (intentionally or by accident) on these partitions, or by removing partitions itself, I think kernel driver should hide all block devices from UFS besides sda on these laptops, at least by default. To put this issue in perspective (again, only if my understanding of partitions content is correct, and only if it's possible to brick board/component this way) I have to note that it's impossible to repair for example Lenovo Yoga C630 WOS in countries where Lenovo doesn't sell it, even for money.