[Parted-maintainers] Bug#762236: parted: [kfreebsd] use of kern.geom.debugflags is unsafe
Steven Chamberlain
steven at pyro.eu.org
Mon Sep 22 13:27:15 UTC 2014
On 09:11, Phillip Susi wrote:
> Umm... it seems to me that if you open your disk O_RDWR, for instance,
> to update your boot loader, while you have a partition on the disk
> mounted, and the kernel destroys an actively mounted partition device,
> then the kernel is very, very broken...
Strangely, the GRUB install step doesn't seem to trigger this... I
can't remember if I was using GPT.
A mere dd if=/dev/null bs=512 of=/dev/ada triggers it. (No actual
blocks written). But to open that O_RDWR when there are mounted
filesystems, requires kern.geom.debugflags to enable "foot shooting"
mode first.
I've only confirmed that it affects ZFS so far, with kfreebsd 10.1,
but I can see other partitions being detached / re-attached on
MEDIACHANGE.
> As for the performance implications, yes, parted should not be using
> O_RDWR when it do doesn't need it and does take care not to on linux.
OK I'll look into this, as we probably should be doing the same.
Regards,
--
Steven Chamberlain
steven at pyro.eu.org
More information about the Parted-maintainers
mailing list