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-next>] [day] [month] [year] [list]
Message-ID: <20210929035528.1990993-1-yebin10@huawei.com>
Date:   Wed, 29 Sep 2021 11:55:28 +0800
From:   Ye Bin <yebin10@...wei.com>
To:     <tytso@....edu>, <adilger.kernel@...ger.ca>,
        <linux-ext4@...r.kernel.org>
CC:     <linux-kernel@...r.kernel.org>, <jack@...e.cz>,
        Ye Bin <yebin10@...wei.com>
Subject: [PATCH -next] jbd2: discard last transaction when commit block checksum broken in v2v3

Now, we meet an issue that commit block has broken checksum when cold reboot
device, that lead to mount failed.
The reason maybe only some sector store on disk, and then device power off.
But we calculate checksum with whole logic block.The data stored on disk can
only ensure the atomicity of sector level.
Actually, we already replay previous transactions. We can just discard last
transaction. As now, descriptor/revocation/commit/superblock has it's own
checksum.

Fixes:80b3767fbe15("jbd2: don't wipe the journal on a failed journal checksum")
Signed-off-by: Ye Bin <yebin10@...wei.com>
---
 fs/jbd2/journal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
index 35302bc192eb..a3dd7b757b3d 100644
--- a/fs/jbd2/journal.c
+++ b/fs/jbd2/journal.c
@@ -2080,7 +2080,7 @@ int jbd2_journal_load(journal_t *journal)
 	if (jbd2_journal_recover(journal))
 		goto recovery_error;
 
-	if (journal->j_failed_commit) {
+	if (journal->j_failed_commit && !jbd2_journal_has_csum_v2or3(journal)) {
 		printk(KERN_ERR "JBD2: journal transaction %u on %s "
 		       "is corrupt.\n", journal->j_failed_commit,
 		       journal->j_devname);
-- 
2.31.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ