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, 5 Jan 2011 11:43:08 -0700
From:	Andreas Dilger <adilger@...ger.ca>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH 5/6] ext4: Drop i_state_flags on architectures with 64-bit longs

On 2011-01-04, at 18:01, Theodore Ts'o wrote:
> +#if (BITS_PER_LONG < 64)
> +EXT4_INODE_BIT_FNS(state, state_flags, 0)
> +#define EXT4_CLEAR_STATE_FLAGS(ei)	(ei)->i_state_flags = 0
> +#else
> +EXT4_INODE_BIT_FNS(state, flags, 32)
> +#define EXT4_CLEAR_STATE_FLAGS(ei)	(ei)->i_flags = 0

This looks like it will clear all of the i_flags values, instead of just the
state flags.  It should probably be something like:

#define EXT4_CLEAR_STATE_FLAGS(ei)	(ei)->i_flags &= 0xffffffffULL;

> @@ -1009,6 +1009,7 @@ got:
> 	 * extent flag on newly created directory and file only if -o extent
> 	 * mount option is specified
> 	 */
> +	EXT4_CLEAR_STATE_FLAGS(ei);
> 	ei->i_flags =
> 		ext4_mask_flags(mode, EXT4_I(dir)->i_flags & EXT4_FL_INHERITED);
> 	ei->i_file_acl = 0;
> @@ -1027,7 +1028,6 @@ got:
> 	inode->i_generation = sbi->s_next_generation++;
> 	spin_unlock(&sbi->s_next_gen_lock);
> 
> -	ei->i_state_flags = 0;

It looks like you have compensated for the above by changing the
code here, but I think it is risky/confusing if clearing the state
flags has a side-effect on 64-bit arches, that doesn't exist on
32-bit arches.  It looks like a bug waiting to happen...

Cheers, Andreas





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