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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070206151242.GB3140@lombardij>
Date:	Tue, 6 Feb 2007 16:12:42 +0100
From:	Johann Lombardi <johann.lombardi@...l.net>
To:	Kalpak Shah <kalpak@...sterfs.com>
Cc:	linux-ext4 <linux-ext4@...r.kernel.org>,
	Andreas Dilger <adilger@...sterfs.com>, tytso <tytso@....edu>,
	sct <sct@...hat.com>
Subject: Re: [RFC] [PATCH 1/1] Nanosecond timestamps

On Fri, Feb 02, 2007 at 08:19:50PM +0530, Kalpak Shah wrote:
> Index: linux-2.6.19/fs/ext3/super.c
> ===================================================================
> --- linux-2.6.19.orig/fs/ext3/super.c
> +++ linux-2.6.19/fs/ext3/super.c
> @@ -1770,6 +1772,32 @@ static int ext3_fill_super (struct super
>         }
>  
>         ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
> +
> +       /* determine the minimum size of new large inodes, if present */
> +       if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
> +           EXT3_SB(sb)->s_want_extra_isize = sizeof(struct ext3_inode) -  EXT3_GOOD_OLD_INODE_SIZE;

Maybe EXT3_SB(sb)-> could be replaced by sbi-> here and in the lines below.

> +               if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
> +                   EXT3_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
> +                       if (EXT3_SB(sb)->s_want_extra_isize <
> +                           le32_to_cpu(es->s_want_extra_isize))
                                ^^
> +                               EXT3_SB(sb)->s_want_extra_isize =
> +                                       le32_to_cpu(es->s_want_extra_isize);
                                            ^^
> +                       if (EXT3_SB(sb)->s_want_extra_isize <
> +                           le32_to_cpu(es->s_min_extra_isize))
                                ^^
> +                               EXT3_SB(sb)->s_want_extra_isize =
> +                                       le32_to_cpu(es->s_min_extra_isize);
                                            ^^
Since es->s_{min,want}_extra_isize are both __u16 (BTW, shouldn't it be __le16?),
I think you should use le16_to_cpu() instead of le32_to_cpu().

> +               }
> +       }
> +       /* Check if enough inode space is available */
> +       if (EXT3_GOOD_OLD_INODE_SIZE + EXT3_SB(sb)->s_want_extra_isize >
> +                                                       sbi->s_inode_size) {
> +               EXT3_SB(sb)->s_want_extra_isize = sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE;
> +               printk(KERN_INFO "EXT3-fs: required extra inode space not"
> +                       "available.\n");
> +       }

If the inode size is EXT3_GOOD_OLD_INODE_SIZE, sbi->s_want_extra_isize won't be
initialized. However, it should not be an issue because the ext3_sb_info
is set to zero in ext3_fill_super().

Johann
-
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