Move magic numbers into magic.h
Move various magic-number definitions into magic.h. Signed-off-by: Nick Black <dank@qemfd.net> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: "David S. Miller" <davem@davemloft.net> Cc: Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
af91322ef3
commit
1fd7317d02
5 changed files with 9 additions and 14 deletions
|
@ -18,14 +18,13 @@
|
||||||
#include <linux/mount.h>
|
#include <linux/mount.h>
|
||||||
#include <linux/tty.h>
|
#include <linux/tty.h>
|
||||||
#include <linux/mutex.h>
|
#include <linux/mutex.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
#include <linux/idr.h>
|
#include <linux/idr.h>
|
||||||
#include <linux/devpts_fs.h>
|
#include <linux/devpts_fs.h>
|
||||||
#include <linux/parser.h>
|
#include <linux/parser.h>
|
||||||
#include <linux/fsnotify.h>
|
#include <linux/fsnotify.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
|
||||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
|
||||||
|
|
||||||
#define DEVPTS_DEFAULT_MODE 0600
|
#define DEVPTS_DEFAULT_MODE 0600
|
||||||
/*
|
/*
|
||||||
* ptmx is a new node in /dev/pts and will be unused in legacy (single-
|
* ptmx is a new node in /dev/pts and will be unused in legacy (single-
|
||||||
|
|
|
@ -31,12 +31,10 @@
|
||||||
#include <linux/statfs.h>
|
#include <linux/statfs.h>
|
||||||
#include <linux/security.h>
|
#include <linux/security.h>
|
||||||
#include <linux/ima.h>
|
#include <linux/ima.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
|
|
||||||
/* some random number */
|
|
||||||
#define HUGETLBFS_MAGIC 0x958458f6
|
|
||||||
|
|
||||||
static const struct super_operations hugetlbfs_ops;
|
static const struct super_operations hugetlbfs_ops;
|
||||||
static const struct address_space_operations hugetlbfs_aops;
|
static const struct address_space_operations hugetlbfs_aops;
|
||||||
const struct file_operations hugetlbfs_file_operations;
|
const struct file_operations hugetlbfs_file_operations;
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define SECURITYFS_MAGIC 0x73636673
|
#define SECURITYFS_MAGIC 0x73636673
|
||||||
#define SELINUX_MAGIC 0xf97cff8c
|
#define SELINUX_MAGIC 0xf97cff8c
|
||||||
#define TMPFS_MAGIC 0x01021994
|
#define TMPFS_MAGIC 0x01021994
|
||||||
|
#define HUGETLBFS_MAGIC 0x958458f6 /* some random number */
|
||||||
#define SQUASHFS_MAGIC 0x73717368
|
#define SQUASHFS_MAGIC 0x73717368
|
||||||
#define EFS_SUPER_MAGIC 0x414A53
|
#define EFS_SUPER_MAGIC 0x414A53
|
||||||
#define EXT2_SUPER_MAGIC 0xEF53
|
#define EXT2_SUPER_MAGIC 0xEF53
|
||||||
|
@ -53,4 +54,8 @@
|
||||||
#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
|
#define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA
|
||||||
|
|
||||||
#define STACK_END_MAGIC 0x57AC6E9D
|
#define STACK_END_MAGIC 0x57AC6E9D
|
||||||
|
|
||||||
|
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
||||||
|
#define SOCKFS_MAGIC 0x534F434B
|
||||||
|
|
||||||
#endif /* __LINUX_MAGIC_H__ */
|
#endif /* __LINUX_MAGIC_H__ */
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
#include <linux/audit.h>
|
#include <linux/audit.h>
|
||||||
#include <linux/wireless.h>
|
#include <linux/wireless.h>
|
||||||
#include <linux/nsproxy.h>
|
#include <linux/nsproxy.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/unistd.h>
|
#include <asm/unistd.h>
|
||||||
|
@ -235,8 +236,6 @@ int move_addr_to_user(struct sockaddr *kaddr, int klen, void __user *uaddr,
|
||||||
return __put_user(klen, ulen);
|
return __put_user(klen, ulen);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define SOCKFS_MAGIC 0x534F434B
|
|
||||||
|
|
||||||
static struct kmem_cache *sock_inode_cachep __read_mostly;
|
static struct kmem_cache *sock_inode_cachep __read_mostly;
|
||||||
|
|
||||||
static struct inode *sock_alloc_inode(struct super_block *sb)
|
static struct inode *sock_alloc_inode(struct super_block *sb)
|
||||||
|
|
|
@ -30,17 +30,11 @@
|
||||||
#include <net/netlabel.h>
|
#include <net/netlabel.h>
|
||||||
#include <net/cipso_ipv4.h>
|
#include <net/cipso_ipv4.h>
|
||||||
#include <linux/audit.h>
|
#include <linux/audit.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
#include "smack.h"
|
#include "smack.h"
|
||||||
|
|
||||||
#define task_security(task) (task_cred_xxx((task), security))
|
#define task_security(task) (task_cred_xxx((task), security))
|
||||||
|
|
||||||
/*
|
|
||||||
* I hope these are the hokeyist lines of code in the module. Casey.
|
|
||||||
*/
|
|
||||||
#define DEVPTS_SUPER_MAGIC 0x1cd1
|
|
||||||
#define SOCKFS_MAGIC 0x534F434B
|
|
||||||
#define TMPFS_MAGIC 0x01021994
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* smk_fetch - Fetch the smack label from a file.
|
* smk_fetch - Fetch the smack label from a file.
|
||||||
* @ip: a pointer to the inode
|
* @ip: a pointer to the inode
|
||||||
|
|
Loading…
Reference in a new issue