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]
Date:	Sat, 25 Nov 2006 02:23:46 -0700
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Valerie Clement <Valerie.Clement@...l.net>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [RFC][PATCH 4/4] BIG_BG: block group descriptor modifications

On Nov 24, 2006  17:48 +0100, Valerie Clement wrote:
> @@ -133,6 +133,9 @@ struct ext4_group_desc
>  	__le32	bg_block_bitmap_hi;	/* Blocks bitmap block MSB */
>  	__le32	bg_inode_bitmap_hi;	/* Inodes bitmap block MSB */
>  	__le32	bg_inode_table_hi;	/* Inodes table block MSB */
> +	__le16	bg_free_blocks_count_hi;	/* Free blocks count MSB */
> +	__le16	bg_free_inodes_count_hi;	/* Free inodes count MSB */
> +	__le16	bg_used_dirs_count_hi;	/* Directories count MSB */
>  };

Does the ext4 code already avoid using "sizeof(struct ext4_group_desc)"
or "sizeof(*gdp)" everywhere?  Otherwise this is very dangerous.

Also note that the on-disk layout of this struct in e2fsprogs is a bit
incorrect - it has the above 3 __u16, but then immediately __u32 bg_reserved
so those fields are padded incorrectly.  I think it isn't a fatal problem,
just something to be aware of and fix.

> +#define EXT4_READ_SPLIT_LE32(__sb, __field)	\
> +	((__u32)le16_to_cpu(__field) +		\
> +	 (EXT4_HAS_INCOMPAT_FEATURE((__sb), EXT4_FEATURE_INCOMPAT_64BIT) ? \
> +	 (__u32)le16_to_cpu(__field##_hi) << 16 : 0))

Is it better to make this INCOMPAT_64BIT or s_desc_size?  Does INCOMPAT_64BIT
always imply s_desc_size > 32?  Hmm, I guess it does, or we have no place to
store the _hi part of the block addresses for a group.

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