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: <20110901003207.31048.55390.stgit@elm3c44.beaverton.ibm.com>
Date:	Wed, 31 Aug 2011 17:32:07 -0700
From:	"Darrick J. Wong" <djwong@...ibm.com>
To:	Andreas Dilger <adilger.kernel@...ger.ca>,
	Theodore Tso <tytso@....edu>,
	"Darrick J. Wong" <djwong@...ibm.com>
Cc:	Sunil Mushran <sunil.mushran@...cle.com>,
	Amir Goldstein <amir73il@...il.com>,
	linux-kernel <linux-kernel@...r.kernel.org>,
	Andi Kleen <andi@...stfloor.org>,
	Mingming Cao <cmm@...ibm.com>,
	Joel Becker <jlbec@...lplan.org>,
	linux-fsdevel <linux-fsdevel@...r.kernel.org>,
	linux-ext4@...r.kernel.org, Coly Li <colyli@...il.com>
Subject: [PATCH 14/16] ext4: Make inode checksum cover empty space

Extend the inode checksum to cover the empty space between the end of the
inode's data fields and the end of the space allocated for the inode.  This
enables us to cover extended attribute data that might live in the empty space.

Signed-off-by: Darrick J. Wong <djwong@...ibm.com>
---
 fs/ext4/inode.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)


diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 44a7f88..e24ba98 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -53,7 +53,6 @@
 static __le32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw)
 {
 	struct ext4_sb_info *sbi = EXT4_SB(inode->i_sb);
-	struct ext4_inode_info *ei = EXT4_I(inode);
 	int offset = offsetof(struct ext4_inode, i_checksum);
 	__le32 inum = cpu_to_le32(inode->i_ino);
 	__u32 crc = 0;
@@ -70,8 +69,7 @@ static __le32 ext4_inode_csum(struct inode *inode, struct ext4_inode *raw)
 	crc = crc32c_le(crc, (__u8 *)raw, offset);
 	offset += sizeof(raw->i_checksum); /* skip checksum */
 	crc = crc32c_le(crc, (__u8 *)raw + offset,
-		    EXT4_GOOD_OLD_INODE_SIZE + ei->i_extra_isize -
-		    offset);
+		    EXT4_INODE_SIZE(inode->i_sb) - offset);
 	return cpu_to_le32(crc);
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ