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:	Mon, 03 Mar 2008 15:05:52 -0700
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	ext4 development <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] resize2fs vs. large inodes, take 2

On Mar 03, 2008  14:40 -0600, Eric Sandeen wrote:
> large inodes with both fast symlinks and in-inode selinux attrs
> were not surviving moves via resize2fs.
> 
> Somehow I missed that there was an ext2fs_get_next_inode_full... 
> I think the below fix is correct, on top of my previous patch
> (and what is in e2fsprogs-1.40.7...)
> 
> ------------------- changelog ----------------------
> 
> Use ext2fs_get_next_inode_full() in resize2fs; previous attempt
> was not properly handling all cases, and was incorrectly setting
> i_extra_isize.
> 
> Signed-off-by: Eric Sandeen <sandeen@...hat.com>
> ---
> 
> Index: e2fsprogs-1.40.7/resize/resize2fs.c
> ===================================================================
> --- e2fsprogs-1.40.7.orig/resize/resize2fs.c
> +++ e2fsprogs-1.40.7/resize/resize2fs.c
> @@ -1168,11 +1168,12 @@ static errcode_t inode_scan_and_fix(ext2
>  	 * elsewhere in the inode table
>  	 */
>  	while (1) {
> -		retval = ext2fs_get_next_inode(scan, &ino, &inode);
> +		retval = ext2fs_get_next_inode_full(scan, &ino, buf, inode_size);
>  		if (retval) goto errout;
>  		if (!ino)
>  			break;
>  
> +		memcpy(&inode, buf, sizeof(struct ext2_inode));

Should this be using "sizeof(struct ext2_inode)" or should it be using
"sb->s_inode_size" instead (extracted from the right struct of course)?

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