lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070514203147.GA26257@schatzie.adilger.int>
Date:	Mon, 14 May 2007 14:31:48 -0600
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Cordenner jean noel <jean-noel.cordenner@...l.net>
Cc:	linux-ext4@...r.kernel.org, Kalpak Shah <kalpak@...sterfs.com>
Subject: Re: [RFC] [patch 2/2] i_version update - ext4 part

On May 14, 2007  14:21 -0600, Andreas Dilger wrote:
> On May 14, 2007  13:05 +0200, Cordenner jean noel wrote:
> > @@ -331,12 +331,13 @@
> >  	} osd2;				/* OS dependent 2 */
> >  	__le16	i_extra_isize;
> >  	__le16	i_pad1;
> > +	__le32	i_disk_version_hi;
> 
> No, this is not correct.  There are already several other fields here
> (nanosecond ctime, mtime, atime, crtime (creation time)) so you need
> to use the correct reserved field for this.
> 
> 	__u16	i_extra_isize;
> 	__u16	i_pad1;
> 	__u32	i_ctime_extra;	/* extra Change time (nsec << 2 | epoch) */
> 	__u32	i_mtime_extra;	/* extra Modification time (nsec << 2 | epoch)*/
> 	__u32	i_atime_extra;	/* extra Access time (nsec << 2 | epoch) */
> 	__u32	i_crtime;	/* File creation time */
> 	__u32	i_crtime_extra;	/* extra File creation time (nsec << 2 |epoch)*/

Sorry, I meant to add (before hitting send :-) that the field after
i_crtime_extra is supposed to be "i_disk_version_hi".

See the patch from Kalpak Shah "[RFC] 64-bit inode version" which also handles
the case for expanding i_extra_isize to cover the needed extra fields if
i_extra_isize is not large enough.  That patch didn't include the 64-bit
i_version_hi yet, because there wasn't yet agreement at that time if
the iversion_hi should be allocated separately, but that was since decided.

Without that patch, your patch will possibly corrupt the extended attributes
by just overwriting i_disk_version_hi while ignoring the actual value of
i_extra_isize.  This would clobber the EA magic and result in loss of all
EAs in that inode.

Cheers, Andreas
--
Andreas Dilger
Principal Software Engineer
Cluster File Systems, Inc.

-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ