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: <9f647c2c2067379143fe85dfcb94842dbed0a97e.1470745951.git.salah.triki@gmail.com>
Date:	Tue,  9 Aug 2016 13:32:54 +0100
From:	Salah Triki <salah.triki@...il.com>
To:	akpm@...ux-foundation.org, viro@...iv.linux.org.uk,
	luisbg@....samsung.com
Cc:	linux-kernel@...r.kernel.org, salah.triki@...il.com
Subject: [PATCH 1/3] fs: befs: load flags field from disk

flags field is usefull for validating the superblock state, so add this
field to befs_sb_info and read the state from the disk.

Signed-off-by: Salah Triki <salah.triki@...il.com>
---
 fs/befs/befs.h  | 3 +++
 fs/befs/super.c | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/fs/befs/befs.h b/fs/befs/befs.h
index e0f59263a..511d16d 100644
--- a/fs/befs/befs.h
+++ b/fs/befs/befs.h
@@ -43,6 +43,9 @@ struct befs_sb_info {
 	u32 ag_shift;
 	u32 num_ags;
 
+	/* State of the superblock */
+	u32 flags;
+
 	/* jornal log entry */
 	befs_block_run log_blocks;
 	befs_off_t log_start;
diff --git a/fs/befs/super.c b/fs/befs/super.c
index aeafc4d..5ab75e8 100644
--- a/fs/befs/super.c
+++ b/fs/befs/super.c
@@ -45,6 +45,8 @@ befs_load_sb(struct super_block *sb, befs_super_block * disk_sb)
 	befs_sb->ag_shift = fs32_to_cpu(sb, disk_sb->ag_shift);
 	befs_sb->num_ags = fs32_to_cpu(sb, disk_sb->num_ags);
 
+	befs_sb->flags = fs32_to_cpu(sb, disk_sb->flags);
+
 	befs_sb->log_blocks = fsrun_to_cpu(sb, disk_sb->log_blocks);
 	befs_sb->log_start = fs64_to_cpu(sb, disk_sb->log_start);
 	befs_sb->log_end = fs64_to_cpu(sb, disk_sb->log_end);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ