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>] [day] [month] [year] [list]
Message-ID: <20070322040016.GK5967@schatzie.adilger.int>
Date:	Wed, 21 Mar 2007 22:00:16 -0600
From:	Andreas Dilger <adilger@...sterfs.com>
To:	Theodore Ts'o <tytso@....edu>, linux-ext4@...r.kernel.org
Cc:	Kalpak Shah <kalpak@...sterfs.com>
Subject: Re: [PATCH 1/2] e2fsprogs: allow more than 32000 subdirectories

On Mar 21, 2007  19:42 +0530, Kalpak Shah wrote:
> Index: e2fsprogs-1.40/lib/ext2fs/ext2_fs.h
> ===================================================================
> --- e2fsprogs-1.40.orig/lib/ext2fs/ext2_fs.h
> +++ e2fsprogs-1.40/lib/ext2fs/ext2_fs.h
> @@ -635,6 +635,7 @@ struct ext2_super_block {
>  #define EXT2_FEATURE_INCOMPAT_SUPP	(EXT2_FEATURE_INCOMPAT_FILETYPE)
>  #define EXT2_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER| \
>  					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \
> +					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
>  					 EXT2_FEATURE_RO_COMPAT_BTREE_DIR)
>  
>  /*
> Index: e2fsprogs-1.40/lib/ext2fs/ext2fs.h
> ===================================================================
> --- e2fsprogs-1.40.orig/lib/ext2fs/ext2fs.h
> +++ e2fsprogs-1.40/lib/ext2fs/ext2fs.h
> @@ -460,7 +463,8 @@ typedef struct ext2_icount *ext2_icount_
>  					 EXT3_FEATURE_INCOMPAT_RECOVER)
>  #endif
>  #define EXT2_LIB_FEATURE_RO_COMPAT_SUPP	(EXT2_FEATURE_RO_COMPAT_SPARSE_SUPER|\
> -					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE)
> +					 EXT2_FEATURE_RO_COMPAT_LARGE_FILE|\
> +					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK)

Ted, can you give a bit of clarification for these different masks.
For EXT2_LIB_SOFTSUPP_RO_COMPAT, it says "These features are only allowed
if EXT2_FLAG_SOFTSUPP_FEATURES is passed to ext2fs_openfs()".  If the patch
from Kalpak adds DIR_NLINK to EXT2_LIB_FEATURE_RO_COMPAT_SUPP, does that
mean we should remove it from EXT2_FLAG_SOFTSUPP_FEATURES?

Also, I notice in ext2fs_open2() that there is a bit of code:

#ifdef EXT2_LIB_SOFTSUPP_RO_COMPAT
	if (flags & EXT2_FLAG_SOFTSUPP_FEATURES)
		features &= !EXT2_LIB_SOFTSUPP_RO_COMPAT;
#endif

But what does "!EXT2_LIB_SOFTSUPP_RO_COMPAT" really mean?  Should this be
~EXT2_LIB_SOFTSUPP_RO_COMPAT?  Should it be instead:

     features &= ~(EXT2_LIB_SOFTSUPP_RO_COMPAT|EXT2_LIB_FEATURE_RO_COMPAT_SUPP)
     
so that we don't mask out all of the features that are NOT in
SOFTSUPP_RO_COMPAT?  Otherwise we've just broken e2fsprogs feature compat
support badly I think.  A similar hunk exists for EXT2_LIB_SOFTSUPP_INCOMPAT.

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