blkdiscard is not aware of "ro" attributes of block devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Block devices can be protected by the ro attribute and this is
sometimes done by default for some devices. For example,

https://www.kernel.org/doc/Documentation/mmc/mmc-dev-parts.txt

in such case the devices can only be written when it's "unlocked"
through the force_ro "knob".

However, I noticed that when I run `blkdiscard [- s]` on such devices,
the protection will simply be ignored. Like I can't write anything to
it with `dd` or so, but `blkdiscard` will wipe them straight away.

Although according to the code in kernel, the BLKDISCARD and
BLKSECDISCARD ioctls seems to do a write mode check when they are
called, it does not prevent `blkdiscard` from wiping emmc boot
partitions, which are "ro" by default, somehow.

Experiencing this with vanilla Linux 4.2.5.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux