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]
Message-ID: <alpine.LFD.2.00.1109051358080.3697@dhcp-27-109.brq.redhat.com>
Date:	Mon, 5 Sep 2011 13:58:32 +0200 (CEST)
From:	Lukas Czerner <lczerner@...hat.com>
To:	"Ted Ts'o" <tytso@....edu>
cc:	Lukas Czerner <lczerner@...hat.com>, linux-ext4@...r.kernel.org
Subject: Re: [PATCH 1/2 v4] e2fsprogs: Fix how we treat user-spcified filesystem
 size

On Sat, 3 Sep 2011, Ted Ts'o wrote:

> On Sun, Jun 05, 2011 at 12:30:44PM +0200, Lukas Czerner wrote:
> > We can not specify filesystem size in blocks count without specifying
> > blocksize as well. It is because we need blocks count to determine
> > filesystem type, and we need filesystem type to determine blocksize. So
> > it should not be allowed, however due to compatibility reason it should
> > be still possible, so at least print warning message for now, so we can
> > easily restrict that later.
> 
> What we currently have is actually very well defined.  The fs-size
> parameter is either an absolute size, if a suffixed value (i.e., 12k,
> 64M, 128G, 2T) is specified.  If the value does not have a suffix,
> then it is either interpreted as a block count if a blocksize is
> specified, or as kilobytes if no blocksize is explicitly specified.
> 
> And this is really only a problem with mke2fs; it's not a problem with
> resize2fs, since we know what the blocksize is.
> 
> > diff --git a/lib/e2p/parse_num.c b/lib/e2p/parse_num.c
> > index 83a329a..8e2751b 100644
> > --- a/lib/e2p/parse_num.c
> > +++ b/lib/e2p/parse_num.c
> > @@ -37,7 +37,6 @@ unsigned long long parse_num_blocks2(const char *arg, int log_block_size)
> >  		num >>= (1+log_block_size);
> >  		break;
> >  	case '\0':
> > -		break;
> >  	default:
> >  		return 0;
> >  	}
> 
> and this doesn't do what the commit description claims.  This change
> actually breaks the use of a number that does not have a suffix.
> 
> I'd rather not break resize2fs at all.  If script wants to specify a
> block count, that's fine.  If we want to add a warning which gets
> printed by mke2fs in the case where there is no explicit blockcount
> specified by the user and no explicit size suffix to the fs-size
> parameter stating that parameter was interpreted as kilobytes, that's
> fine.
> 
> Basically, how mke2fs parses that field has been the way it has been
> for over a decade, and it's really not caused any problems for users.
> 
>     	   	       	    	       - Ted
> 

Ok, than. We can drop the patch.

Thanks!
-Lukas
--
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