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, 11 May 2009 13:35:22 -0600
From:	Andreas Dilger <adilger@....com>
To:	Eric Sandeen <sandeen@...hat.com>
Cc:	Alexander Shishkin <alexander.shishckin@...il.com>,
	linux-ext4@...r.kernel.org
Subject: Re: [Q] ext3 mkfs: zeroing journal blocks

On May 11, 2009  13:44 -0500, Eric Sandeen wrote:
> Andreas Dilger wrote:
> > The reason that the journal is zeroed is because there is some chance
> > that old (valid at the time) transaction headers and commit blocks might
> > be in the journal and could accidentally be "recovered" and cause bad
> > corruption of the filesystem.
> 
> But I guess the question is, why isn't a normal internal log zeroed?
> 
> If I'm reading it right only external logs get this treatment, and I
> think that's what generated the original question from Alexander.

Hmm, possibly because when ext3 was first allocated the internal journal
created was "dd if=/dev/zero of=/mnt/fs/.journal bs=1M count={jnl_size}"
on the filesystem mounted as ext2, so normal filesystem IO would handle
the zeroing of the blocks.  Even today if tune2fs adds a journal to a
filesystem it does the zero filling of the journal.

Looking at the mke2fs code it also appears to be doing zeroing of the
journal inode in:

      mke2fs
        ->ext2fs_add_journal_inode
	  ->write_journal_inode
	    ->ext2fs_block_iterate
	      ->mkjournal_proc (increment zero_count)
	  ->ext2fs_zero_blocks

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