Commit 92562927826fceb2f8e69c89e28161b8c1e0b125
Committed by
James Morris
1 parent
93db628658
Exists in
master
and in
7 other branches
integrity: special fs magic
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>
Showing 4 changed files with 7 additions and 7 deletions Side-by-side Diff
fs/debugfs/inode.c
include/linux/magic.h
... | ... | @@ -6,6 +6,10 @@ |
6 | 6 | #define AFS_SUPER_MAGIC 0x5346414F |
7 | 7 | #define AUTOFS_SUPER_MAGIC 0x0187 |
8 | 8 | #define CODA_SUPER_MAGIC 0x73757245 |
9 | +#define DEBUGFS_MAGIC 0x64626720 | |
10 | +#define SYSFS_MAGIC 0x62656572 | |
11 | +#define SECURITYFS_MAGIC 0x73636673 | |
12 | +#define TMPFS_MAGIC 0x01021994 | |
9 | 13 | #define EFS_SUPER_MAGIC 0x414A53 |
10 | 14 | #define EXT2_SUPER_MAGIC 0xEF53 |
11 | 15 | #define EXT3_SUPER_MAGIC 0xEF53 |
mm/shmem.c
... | ... | @@ -50,13 +50,11 @@ |
50 | 50 | #include <linux/migrate.h> |
51 | 51 | #include <linux/highmem.h> |
52 | 52 | #include <linux/seq_file.h> |
53 | +#include <linux/magic.h> | |
53 | 54 | |
54 | 55 | #include <asm/uaccess.h> |
55 | 56 | #include <asm/div64.h> |
56 | 57 | #include <asm/pgtable.h> |
57 | - | |
58 | -/* This magic number is used in glibc for posix shared memory */ | |
59 | -#define TMPFS_MAGIC 0x01021994 | |
60 | 58 | |
61 | 59 | #define ENTRIES_PER_PAGE (PAGE_CACHE_SIZE/sizeof(unsigned long)) |
62 | 60 | #define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE) |
security/inode.c