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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Date:   Sun, 21 May 2017 17:42:54 +0200
From:   Fabian Frederick <fabf@...net.be>
To:     Alexander Viro <viro@...iv.linux.org.uk>
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        fabf@...net.be
Subject: [PATCH 10/11 linux-next] fs: define hfs super magic values globally

hfs values were defined twice (in hfs and hfsplus)
This patch exports values globally and include magic.h
in hfs.h and hfsplus_raw.h where other magic are going to
be exported as well.

Signed-off-by: Fabian Frederick <fabf@...net.be>
---
 fs/hfs/hfs.h               | 4 ++--
 fs/hfsplus/hfsplus_raw.h   | 1 +
 fs/hfsplus/part_tbl.c      | 2 --
 include/uapi/linux/magic.h | 2 ++
 4 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h
index 6f194d0..4a10a84 100644
--- a/fs/hfs/hfs.h
+++ b/fs/hfs/hfs.h
@@ -9,6 +9,8 @@
 #ifndef _HFS_H
 #define _HFS_H
 
+#include <linux/magic.h>
+
 /* offsets to various blocks */
 #define HFS_DD_BLK		0 /* Driver Descriptor block */
 #define HFS_PMAP_BLK		1 /* First block of partition map */
@@ -18,8 +20,6 @@
 #define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
-#define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /* various FIXED size parameters */
 #define HFS_SECTOR_SIZE		512    /* size of an HFS sector */
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h
index 8298d09..80554d4 100644
--- a/fs/hfsplus/hfsplus_raw.h
+++ b/fs/hfsplus/hfsplus_raw.h
@@ -14,6 +14,7 @@
 #define _LINUX_HFSPLUS_RAW_H
 
 #include <linux/types.h>
+#include <linux/magic.h>
 
 /* Some constants */
 #define HFSPLUS_SECTOR_SIZE        512
diff --git a/fs/hfsplus/part_tbl.c b/fs/hfsplus/part_tbl.c
index 63164eb..12d3e0b 100644
--- a/fs/hfsplus/part_tbl.c
+++ b/fs/hfsplus/part_tbl.c
@@ -26,8 +26,6 @@
 #define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
-#define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /*
  * The new style Mac partition map
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index e61d5af..8690964 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -32,6 +32,8 @@
 #define FUSE_CTL_SUPER_MAGIC	0x65735543
 #define FUSE_SUPER_MAGIC	0x65735546
 #define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
+#define HFS_SUPER_MAGIC		0x4244		/* "BD": HFS MDB (super block) */
+#define HFS_MFS_SUPER_MAGIC	0xD2D7		/* MFS MDB (super block) */
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
 #define HPFS_SUPER_MAGIC	0xf995e849
 #define HUGETLBFS_MAGIC		0x958458f6	/* some random number */
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ