aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/devpts/inode.c3
-rw-r--r--fs/hugetlbfs/inode.c4
-rw-r--r--include/linux/magic.h5
-rw-r--r--net/socket.c3
-rw-r--r--security/smack/smack_lsm.c8
5 files changed, 9 insertions, 14 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 75efb028974b..d5f8c96964be 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -18,14 +18,13 @@
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/tty.h> 19#include <linux/tty.h>
20#include <linux/mutex.h> 20#include <linux/mutex.h>
21#include <linux/magic.h>
21#include <linux/idr.h> 22#include <linux/idr.h>
22#include <linux/devpts_fs.h> 23#include <linux/devpts_fs.h>
23#include <linux/parser.h> 24#include <linux/parser.h>
24#include <linux/fsnotify.h> 25#include <linux/fsnotify.h>
25#include <linux/seq_file.h> 26#include <linux/seq_file.h>
26 27
27#define DEVPTS_SUPER_MAGIC 0x1cd1
28
29#define DEVPTS_DEFAULT_MODE 0600 28#define DEVPTS_DEFAULT_MODE 0600
30/* 29/*
31 * ptmx is a new node in /dev/pts and will be unused in legacy (single- 30 * ptmx is a new node in /dev/pts and will be unused in legacy (single-
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index 06b7c2623f99..eba6d552d9c9 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -31,12 +31,10 @@
31#include <linux/statfs.h> 31#include <linux/statfs.h>
32#include <linux/security.h> 32#include <linux/security.h>
33#include <linux/ima.h> 33#include <linux/ima.h>
34#include <linux/magic.h>
34 35
35#include <asm/uaccess.h> 36#include <asm/uaccess.h>
36 37
37/* some random number */
38#define HUGETLBFS_MAGIC 0x958458f6
39
40static const struct super_operations hugetlbfs_ops; 38static const struct super_operations hugetlbfs_ops;
41static const struct address_space_operations hugetlbfs_aops; 39static const struct address_space_operations hugetlbfs_aops;
42const struct file_operations hugetlbfs_file_operations; 40const struct file_operations hugetlbfs_file_operations;
diff --git a/include/linux/magic.h b/include/linux/magic.h
index 1923327b9869..bce37786a0a5 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -13,6 +13,7 @@
13#define SECURITYFS_MAGIC 0x73636673 13#define SECURITYFS_MAGIC 0x73636673
14#define SELINUX_MAGIC 0xf97cff8c 14#define SELINUX_MAGIC 0xf97cff8c
15#define TMPFS_MAGIC 0x01021994 15#define TMPFS_MAGIC 0x01021994
16#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */
16#define SQUASHFS_MAGIC 0x73717368 17#define SQUASHFS_MAGIC 0x73717368
17#define EFS_SUPER_MAGIC 0x414A53 18#define EFS_SUPER_MAGIC 0x414A53
18#define EXT2_SUPER_MAGIC 0xEF53 19#define EXT2_SUPER_MAGIC 0xEF53
@@ -53,4 +54,8 @@
53#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA 54#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
54 55
55#define STACK_END_MAGIC 0x57AC6E9D 56#define STACK_END_MAGIC 0x57AC6E9D
57
58#define DEVPTS_SUPER_MAGIC 0x1cd1
59#define SOCKFS_MAGIC 0x534F434B
60
56#endif /* __LINUX_MAGIC_H__ */ 61#endif /* __LINUX_MAGIC_H__ */
diff --git a/net/socket.c b/net/socket.c
index 0ad02ae61a91..49917a1cac7d 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -86,6 +86,7 @@
86#include <linux/audit.h> 86#include <linux/audit.h>
87#include <linux/wireless.h> 87#include <linux/wireless.h>
88#include <linux/nsproxy.h> 88#include <linux/nsproxy.h>
89#include <linux/magic.h>
89 90
90#include <asm/uaccess.h> 91#include <asm/uaccess.h>
91#include <asm/unistd.h> 92#include <asm/unistd.h>
@@ -235,8 +236,6 @@ int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr,
235 return __put_user(klen, ulen); 236 return __put_user(klen, ulen);
236} 237}
237 238
238#define SOCKFS_MAGIC 0x534F434B
239
240static struct kmem_cache *sock_inode_cachep __read_mostly; 239static struct kmem_cache *sock_inode_cachep __read_mostly;
241 240
242static struct inode *sock_alloc_inode(struct super_block *sb) 241static struct inode *sock_alloc_inode(struct super_block *sb)
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c
index acae7ef4092d..c33b6bb9b6dd 100644
--- a/security/smack/smack_lsm.c
+++ b/security/smack/smack_lsm.c
@@ -30,17 +30,11 @@
30#include <net/netlabel.h> 30#include <net/netlabel.h>
31#include <net/cipso_ipv4.h> 31#include <net/cipso_ipv4.h>
32#include <linux/audit.h> 32#include <linux/audit.h>
33#include <linux/magic.h>
33#include "smack.h" 34#include "smack.h"
34 35
35#define task_security(task) (task_cred_xxx((task), security)) 36#define task_security(task) (task_cred_xxx((task), security))
36 37
37/*
38 * I hope these are the hokeyist lines of code in the module. Casey.
39 */
40#define DEVPTS_SUPER_MAGIC 0x1cd1
41#define SOCKFS_MAGIC 0x534F434B
42#define TMPFS_MAGIC 0x01021994
43
44/** 38/**
45 * smk_fetch - Fetch the smack label from a file. 39 * smk_fetch - Fetch the smack label from a file.
46 * @ip: a pointer to the inode 40 * @ip: a pointer to the inode