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]
Message-Id: <BF98D76A-62BB-4346-A790-0A429C916A82@dilger.ca>
Date:   Wed, 23 May 2018 12:08:39 -0600
From:   Andreas Dilger <adilger@...ger.ca>
To:     Chandan Rajendra <chandan@...ux.vnet.ibm.com>
Cc:     linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] e2fsprogs: Use 32-bit variant of ext2fs_swab to read
 i_projid

On May 22, 2018, at 9:22 PM, Chandan Rajendra <chandan@...ux.vnet.ibm.com> wrote:
> 
> i_projid is a 32-bit field of the inode. Hence this commit uses
> ext2fs_swab32() to convert the i_projid field from the on-disk little
> endian format to the host cpu format. Without this change, project quota
> consistency check used to fail on big endian powerpc systems.
> 
> Signed-off-by: Chandan Rajendra <chandan@...ux.vnet.ibm.com>

Reviewed-by: Andreas Dilger <adilger@...ger.ca>

> ---
> lib/ext2fs/swapfs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/ext2fs/swapfs.c b/lib/ext2fs/swapfs.c
> index 0cf5f9a..b168a2f 100644
> --- a/lib/ext2fs/swapfs.c
> +++ b/lib/ext2fs/swapfs.c
> @@ -357,7 +357,7 @@ void ext2fs_swap_inode_full(ext2_filsys fs, struct ext2_inode_large *t,
> 	if (inode_includes(inode_size, i_version_hi))
> 		t->i_version_hi = ext2fs_swab32(f->i_version_hi);
> 	if (inode_includes(inode_size, i_projid))
> -                t->i_projid = ext2fs_swab16(f->i_projid);
> +                t->i_projid = ext2fs_swab32(f->i_projid);
> 	/* catch new static fields added after i_projid */
> 	EXT2FS_BUILD_BUG_ON(sizeof(struct ext2_inode_large) != 160);
> 
> --
> 2.9.5
> 


Cheers, Andreas






Download attachment "signature.asc" of type "application/pgp-signature" (874 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ