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

Re: Bug#760275: e2fsprogs: e2fsck corrupts Hurd filesystems

On Thu, Jan 22, 2015 at 07:41:10PM +0100, Justus Winter wrote:
> > 
> > > since we have a bunch of workarounds
> > > keyed off of that, and your patch will add another --- and I'm
> > > planning on adding still more to make sure a user doesn't accidentally
> > > turn on some ext4 features via mke2fs or tune2fs that use fields that
> > > the Hurd is using for its own nefarious purposes.  Otherwise, the
> > > usage clash would lead to no good....
> > 
> > If an e2fsprog or Linux uses the Linux specific stuff of the OS
> > dependent fields without verifying the creator OS, then this is a bug.
> > Fixing such a bug is no workaround.

I've been taking a closer look at the patch that you submitted to fix
this bug (in the tree as 36769c606c2700) since it has been reported
that this is causing a regression on FreeBSD.

Taking a look at it more closely --- if this patch helps, this implies
that Hurd users are turning on the ext4 HUGE_FILE feature, since we
only do this test if the HUGE_FILE feature is enabled.

So this brings up a number of questions

a) Is the hurd properly checking the ext4 feature flags?  Since this
is a RO_COMPAT feature, if the feature is set, the Hurd should be
refusing to write to the file system?  And if the hurd is claiming
that it supports this feature, then it shouldn't be using the
linux2.l_i_blocks_hi field, since part of the definition of HUGE_FILE
is that the linux2.l_i_blocks_hi field is used.

b) Why are Hurd users using file systems with the HUGE_FILE feature
set?  There is something very, VERY wrong going on here, in how Hurd
is using the ext2 file system.

The OS specific field was a terrible, terrible, mistake, and I'm
beginning to think that accomodating the Hurd without someone riding
hurd (as it were) on the Hurd developers to make sure they weren't
doing somethign horribly wrong was a mistake.  Clearly the Hurd ext2
file system developers can't be trusted to DTRT, and the rules around
the feature flags going back decades and have always been VERY clear.

    	    	  	     	     	      - Ted

Reply to: