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]
Date:   Tue, 12 Jul 2022 00:26:37 +0800
From:   Wang Jianjian <wangjianjian0@...mail.com>
To:     linux-ext4@...r.kernel.org
Cc:     Wang Jianjian <wangjianjian0@...mail.com>
Subject: [PATCH] jbd2: Set the right uuid for block tag

journal->j_uuid is not initialized and let us use the uuid from
j_superblock. And since this is the only place where j_uuid is used
so that we can remove it.

Signed-off-by: Wang Jianjian <wangjianjian0@...mail.com>
---
 fs/jbd2/commit.c     |  2 +-
 include/linux/jbd2.h | 10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c
index 5b9408e3b370..efde9c494e7a 100644
--- a/fs/jbd2/commit.c
+++ b/fs/jbd2/commit.c
@@ -720,7 +720,7 @@ void jbd2_journal_commit_transaction(journal_t *journal)
 		bufs++;
 
 		if (first_tag) {
-			memcpy (tagp, journal->j_uuid, 16);
+			memcpy (tagp, journal->j_superblock->s_uuid, 16);
 			tagp += 16;
 			space_left -= 16;
 			first_tag = 0;
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index de9536680b2b..9d51f4b55cb5 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -1079,16 +1079,6 @@ struct journal_s
 	 */
 	tid_t			j_commit_request;
 
-	/**
-	 * @j_uuid:
-	 *
-	 * Journal uuid: identifies the object (filesystem, LVM volume etc)
-	 * backed by this journal.  This will eventually be replaced by an array
-	 * of uuids, allowing us to index multiple devices within a single
-	 * journal and to perform atomic updates across them.
-	 */
-	__u8			j_uuid[16];
-
 	/**
 	 * @j_task: Pointer to the current commit thread for this journal.
 	 */
-- 
2.34.3

Powered by blists - more mailing lists