]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
integrity: special fs magic
authorMimi Zohar <zohar@linux.vnet.ibm.com>
Tue, 7 Oct 2008 18:00:12 +0000 (14:00 -0400)
committerJames Morris <jmorris@namei.org>
Sun, 12 Oct 2008 22:47:43 +0000 (09:47 +1100)
Discussion on the mailing list questioned the use of these
magic values in userspace, concluding these values are already
exported to userspace via statfs and their correct/incorrect
usage is left up to the userspace application.

  - Move special fs magic number definitions to magic.h
  - Add magic.h include

Signed-off-by: Mimi Zohar <zohar@us.ibm.com>
Reviewed-by: James Morris <jmorris@namei.org>
Signed-off-by: James Morris <jmorris@namei.org>
fs/debugfs/inode.c
include/linux/magic.h
mm/shmem.c
security/inode.c

index 08e28c9bb4164f5e2f549535959fd816d92521ed..3dbe2169cf36358730317f3ac563cf985c3cbc0b 100644 (file)
@@ -26,8 +26,7 @@
 #include <linux/debugfs.h>
 #include <linux/fsnotify.h>
 #include <linux/string.h>
-
-#define DEBUGFS_MAGIC  0x64626720
+#include <linux/magic.h>
 
 static struct vfsmount *debugfs_mount;
 static int debugfs_mount_count;
index 1fa0c2ce4dec09456f5cb6c2480f6be5e5eb908a..f7f3fdddbef0b5f4f599cd506c524e4c9bf0b911 100644 (file)
@@ -6,6 +6,10 @@
 #define AFS_SUPER_MAGIC                0x5346414F
 #define AUTOFS_SUPER_MAGIC     0x0187
 #define CODA_SUPER_MAGIC       0x73757245
+#define DEBUGFS_MAGIC          0x64626720
+#define SYSFS_MAGIC            0x62656572
+#define SECURITYFS_MAGIC       0x73636673
+#define TMPFS_MAGIC            0x01021994
 #define EFS_SUPER_MAGIC                0x414A53
 #define EXT2_SUPER_MAGIC       0xEF53
 #define EXT3_SUPER_MAGIC       0xEF53
index 04fb4f1ab88e7e0c87e646afded96e962251fb61..bf66d0191baf57e36a72143335f0d3d93e24d548 100644 (file)
 #include <linux/migrate.h>
 #include <linux/highmem.h>
 #include <linux/seq_file.h>
+#include <linux/magic.h>
 
 #include <asm/uaccess.h>
 #include <asm/div64.h>
 #include <asm/pgtable.h>
 
-/* This magic number is used in glibc for posix shared memory */
-#define TMPFS_MAGIC    0x01021994
-
 #define ENTRIES_PER_PAGE (PAGE_CACHE_SIZE/sizeof(unsigned long))
 #define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE)
 #define BLOCKS_PER_PAGE  (PAGE_CACHE_SIZE/512)
index ca4958ebad8d30c7c4f8ce4bdf1b98309fe2e13e..efea5a6054663f2d2aba78930bd3185986e14cdd 100644 (file)
@@ -20,8 +20,7 @@
 #include <linux/init.h>
 #include <linux/namei.h>
 #include <linux/security.h>
-
-#define SECURITYFS_MAGIC       0x73636673
+#include <linux/magic.h>
 
 static struct vfsmount *mount;
 static int mount_count;