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] [day] [month] [year] [list]
Date:	Mon, 16 Jun 2008 16:57:01 -0700
From:	Mingming <cmm@...ibm.com>
To:	Andreas Dilger <adilger@....com>
Cc:	Akinobu Mita <akinobu.mita@...il.com>, linux-ext4@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	Stephen Tweedie <sct@...hat.com>, adilger@...sterfs.com,
	Theodore Tso <tytso@....EDU>
Subject: Re: [PATCH] ext4: fix ext4_init_block_bitmap() for metablock block
	group


On Mon, 2008-06-16 at 13:19 -0600, Andreas Dilger wrote:
> On Jun 16, 2008  23:10 +0900, Akinobu Mita wrote:
> > Looks good to me. But I'd like to divide into the change into simple
> > bugfix and cleanup patch in order to clarify the each change.
> > 
> > Here is a bugfix only patch.
> > 
> > From: Akinobu Mita <akinobu.mita@...il.com>
> > Subject: ext4: fix ext4_init_block_bitmap() for metablock block group
> > 
> > When meta_bg feature is enabled and s_first_meta_bg != 0, 
> > ext4_init_block_bitmap() miscalculates the number of block used by
> > the group descriptor table (0 or 1 for metablock block group)
> > 
> > group_rel in the original code should be calculated by:
> > 
> >         group_rel = block_group % EXT4_DESC_PER_BLOCK(sb);
> > 
> > No need to subtract s_first_meta_bg from brock_group.
> > It will be equivalent what ext4_bg_num_gdb_meta() does
> > 
> > Signed-off-by: Akinobu Mita <akinobu.mita@...il.com>
> > Cc: Andrew Morton <akpm@...ux-foundation.org>
> > Cc: Stephen Tweedie <sct@...hat.com>
> > Cc: adilger@...sterfs.com
> > Cc: Mingming Cao <cmm@...ibm.com>
> > Cc: Theodore Tso <tytso@....EDU>
> 
> Acked-by: Andreas Dilger <adilger@....com>
> 

FYI, I have added this patch to patch queue

Mingming
> > ---
> >  fs/ext4/balloc.c |    5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> > 
> > Index: 2.6-git/fs/ext4/balloc.c
> > ===================================================================
> > --- 2.6-git.orig/fs/ext4/balloc.c
> > +++ 2.6-git/fs/ext4/balloc.c
> > @@ -121,9 +121,8 @@ unsigned ext4_init_block_bitmap(struct s
> >  				le16_to_cpu(sbi->s_es->s_reserved_gdt_blocks);
> >  		}
> >  	} else { /* For META_BG_BLOCK_GROUPS */
> > -		int group_rel = (block_group -
> > -				 le32_to_cpu(sbi->s_es->s_first_meta_bg)) %
> > -				EXT4_DESC_PER_BLOCK(sb);
> > +		int group_rel = block_group % EXT4_DESC_PER_BLOCK(sb);
> > +
> >  		if (group_rel == 0 || group_rel == 1 ||
> >  		    (group_rel == EXT4_DESC_PER_BLOCK(sb) - 1))
> >  			bit_max += 1;
> 
> Cheers, Andreas
> --
> Andreas Dilger
> Sr. Staff Engineer, Lustre Group
> Sun Microsystems of Canada, 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