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] [day] [month] [year] [list]
Date:	Thu, 21 Jun 2007 14:29:08 -0600
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Valerie Clement <valerie.clement@...l.net>
Cc:	Theodore Tso <tytso@....edu>,
	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [RFC][PATCH 6/11][take 2] handling of 64-bit block counts in e2fsprofs

On Jun 21, 2007  17:25 +0200, Valerie Clement wrote:
> @@ -26,8 +26,11 @@ void ext2fs_swap_super(struct ext2_super
>  	sb->s_inodes_count = ext2fs_swab32(sb->s_inodes_count);
>  	sb->s_blocks_count = ext2fs_swab32(sb->s_blocks_count);
> +	sb->s_blocks_count_hi = ext2fs_swab32(sb->s_blocks_count_hi);
>  	sb->s_r_blocks_count = ext2fs_swab32(sb->s_r_blocks_count);
> +	sb->s_r_blocks_count_hi = ext2fs_swab32(sb->s_r_blocks_count_hi);
>  	sb->s_free_blocks_count = ext2fs_swab32(sb->s_free_blocks_count);
> +	sb->s_free_blocks_hi = ext2fs_swab32(sb->s_free_blocks_hi);
>  	sb->s_free_inodes_count = ext2fs_swab32(sb->s_free_inodes_count);
>  	sb->s_first_data_block = ext2fs_swab32(sb->s_first_data_block);
>  	sb->s_log_block_size = ext2fs_swab32(sb->s_log_block_size);

I prefer to keep the swabbing code in the same order as the field
declarations in the struct.  That makes it easier to verify everything
is handled.

> @@ -1492,14 +1495,15 @@ static void PRS(int argc, char *argv[])
>  	 * Calculate number of blocks to reserve
>  	 */
> -	fs_param.s_r_blocks_count = e2p_percent(reserved_ratio, 
> -						fs_param.s_blocks_count);
> +	EXT2_R_BLOCKS_COUNT_SET(
> +		&fs_param, e2p_percent(
> +			reserved_ratio, EXT2_BLOCKS_COUNT(&fs_param)));

This may as well just be on 2 lines.

> --- e2fsprogs-1.39-tyt3-v7.orig/resize/resize2fs.c	2007-06-21 13:12:03.000000000 +0200
> +++ e2fsprogs-1.39-tyt3-v7/resize/resize2fs.c	2007-06-21 13:13:05.000000000 +0200
> @@ -34,6 +34,7 @@
>   */
>  
>  #include "resize2fs.h"
> +#include "e2p/e2p.h"
>  #include <time.h>
>  
>  #ifdef __linux__			/* Kludge for debugging */

This should go in "resize2fs.h", like all of the other e2fsprogs-specific
headers, and probably should be in a separate patch so Ted can incorporate
it immediately.

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