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] [day] [month] [year] [list]
Message-ID: <YXq3k/sC+p0NzGsb@mit.edu>
Date:   Thu, 28 Oct 2021 10:45:39 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Andreas Dilger <adilger@...ger.ca>
Cc:     linux-ext4@...r.kernel.org
Subject: Re: [PATCH] ext2fs: avoid re-reading inode multiple times

On Wed, Apr 07, 2021 at 01:50:23AM -0600, Andreas Dilger wrote:
> Reduce the number of times that the inode is read from storage.
> Factor ext2fs_xattrs_read() into a new ext2fs_xattrs_read_inode()
> function that can accept an in-memory inode, and call that from
> within ext2fs_xattrs_read() and in e2fsck_pass1() when the inode
> is already available.
> 
> Similarly, in e2fsck_pass4() avoid re-reading the inode multiple
> times in disconnect_inode(), check_ea_inode(), and in the main
> function body if possible.
> 
> Signed-off-by: Andreas Dilger <adilger@...ger.ca>

Applied, although I needed to add this initialization patch to avoid a
"make check" failure.

diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index 157e6eac..d36fe68d 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -998,7 +998,7 @@ errcode_t ext2fs_xattrs_read_inode(struct ext2_xattr_handle *handle,
 	char *start, *block_buf = NULL;
 	blk64_t blk;
 	size_t i;
-	errcode_t err;
+	errcode_t err = 0;
 
 	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
 
						- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ