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: <20240903173157.602995-1-daeho43@gmail.com>
Date: Tue,  3 Sep 2024 10:31:57 -0700
From: Daeho Jeong <daeho43@...il.com>
To: linux-kernel@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net,
	kernel-team@...roid.com
Cc: Daeho Jeong <daehojeong@...gle.com>
Subject: [PATCH] mkfs.f2fs: use correct endian conversion for writing lpf inode

From: Daeho Jeong <daehojeong@...gle.com>

The conversion between cpu and little endian is incorrect.

Signed-off-by: Daeho Jeong <daehojeong@...gle.com>
---
 mkfs/f2fs_format.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mkfs/f2fs_format.c b/mkfs/f2fs_format.c
index c9d335a..30d8e19 100644
--- a/mkfs/f2fs_format.c
+++ b/mkfs/f2fs_format.c
@@ -1547,8 +1547,8 @@ static int f2fs_write_lpf_inode(void)
 
 	f2fs_init_inode(sb, raw_node, c.lpf_ino, mkfs_time, 0x41c0);
 
-	raw_node->i.i_pino = le32_to_cpu(sb->root_ino);
-	raw_node->i.i_namelen = le32_to_cpu(strlen(LPF));
+	raw_node->i.i_pino = sb->root_ino;
+	raw_node->i.i_namelen = cpu_to_le32(strlen(LPF));
 	memcpy(raw_node->i.i_name, LPF, strlen(LPF));
 
 	node_blkaddr = alloc_next_free_block(CURSEG_HOT_NODE);
-- 
2.46.0.469.g59c65b2a67-goog


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ