All of lore.kernel.org
 help / color / mirror / Atom feed
* Ensuring that mount(8) will always interpret a filesystem correctly
@ 2024-12-08  1:45 Demi Marie Obenour
  2024-12-09 10:26 ` Karel Zak
  0 siblings, 1 reply; 8+ messages in thread
From: Demi Marie Obenour @ 2024-12-08  1:45 UTC (permalink / raw)
  To: util-linux

Is there a guarantee that if all data before the filesystem superblock is
zero, and that the filesystem never writes to this region, libblkid (and
thus, presumably, mount(8)) will always mount the filesystem with the
correct filesystem type, even if e.g. someone writes a file containing
a superblock of a different filesystem and the filesystem happens to put
it where that superblock is valid?

The motivation for this message is that systemd-gpt-generator generates
mountpoints based on Discoverable Partition Specification GUIDs.  These
indicate the mountpoint of the partition but not the filesystem type.
If a correctly-produced filesystem image will always continue to be
recognized as the correct type, this is fine.  Otherwise, an unlucky
combination of writes to the filesystem and filesystem allocation decisions
could cause the filesystem to start being mounted as the wrong type, which
would be very bad.  According to https://github.com/util-linux/util-linux/issues/1305,
libblkid can indeed probe for subsequent superblocks after the first one it
finds.
-- 
Sincerely,
Demi Marie Obenour (she/her/hers)


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-15  3:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-08  1:45 Ensuring that mount(8) will always interpret a filesystem correctly Demi Marie Obenour
2024-12-09 10:26 ` Karel Zak
2024-12-10  5:11   ` Demi Marie Obenour
2024-12-10 11:16     ` Karel Zak
2024-12-10 23:28       ` Demi Marie Obenour
2024-12-11 13:38         ` Theodore Ts'o
2024-12-14 22:08           ` Demi Marie Obenour
2024-12-15  3:20             ` Theodore Ts'o

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.