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:	Wed, 16 Jul 2008 09:09:31 -0500
From:	"Jose R. Santos" <jrs@...ibm.com>
To:	Goswin von Brederlow <goswin-v-b@....de>
Cc:	"Theodore Ts'o" <tytso@....edu>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 15/15][e2fsprogs] 64-bit mke2fs cleanup

On Wed, 16 Jul 2008 14:50:14 +0200
Goswin von Brederlow <goswin-v-b@....de> wrote:

> "Jose R. Santos" <jrs@...ibm.com> writes:
> 
> > diff --git a/misc/mke2fs.c b/misc/mke2fs.c
> > index 7171990..817be56 100644
> > --- a/misc/mke2fs.c
> > +++ b/misc/mke2fs.c
> > @@ -1402,12 +1402,12 @@ static void PRS(int argc, char *argv[])
> >  
> >  	fs_param.s_log_frag_size = fs_param.s_log_block_size;
> >  
> > -	if (noaction && fs_param.s_blocks_count) {
> > -		dev_size = fs_param.s_blocks_count;
> > +	if (noaction && ext2fs_blocks_count(&fs_param)) {
> > +		dev_size = ext2fs_blocks_count(&fs_param);
> >  		retval = 0;
> >  	} else {
> >  	retry:
> > -		retval = ext2fs_get_device_size(device_name,
> > +		retval = ext2fs_get_device_size2(device_name,
> >  						EXT2_BLOCK_SIZE(&fs_param),
> >  						&dev_size);
> >  		if ((retval == EFBIG) &&
> 
> You should not assume that ext2fs_get_device_size2() will return EFBIG
> if the size exceed 2^32 blocks. The point of ext2fs_get_device_size2()
> was to be able to support more than 2^32 blocks and the library
> function will certainly change to return larger numbers in the future.
> 
> So you need something like
> 
> if ((retval == EFBIG || dev_size >= (1ULL << 32)) &&

No, ext2fs_get_device_size2() should return EFBIG size if the device is
larger than 48-bit.  I need to fix that on ext2fs_get_device_size2() but 
this check here is ok.

> MfG
>         Goswin

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