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>
This commit is contained in:
Родитель
93db628658
Коммит
9256292782
|
@ -26,8 +26,7 @@
|
||||||
#include <linux/debugfs.h>
|
#include <linux/debugfs.h>
|
||||||
#include <linux/fsnotify.h>
|
#include <linux/fsnotify.h>
|
||||||
#include <linux/string.h>
|
#include <linux/string.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
#define DEBUGFS_MAGIC 0x64626720
|
|
||||||
|
|
||||||
static struct vfsmount *debugfs_mount;
|
static struct vfsmount *debugfs_mount;
|
||||||
static int debugfs_mount_count;
|
static int debugfs_mount_count;
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
#define AFS_SUPER_MAGIC 0x5346414F
|
#define AFS_SUPER_MAGIC 0x5346414F
|
||||||
#define AUTOFS_SUPER_MAGIC 0x0187
|
#define AUTOFS_SUPER_MAGIC 0x0187
|
||||||
#define CODA_SUPER_MAGIC 0x73757245
|
#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 EFS_SUPER_MAGIC 0x414A53
|
||||||
#define EXT2_SUPER_MAGIC 0xEF53
|
#define EXT2_SUPER_MAGIC 0xEF53
|
||||||
#define EXT3_SUPER_MAGIC 0xEF53
|
#define EXT3_SUPER_MAGIC 0xEF53
|
||||||
|
|
|
@ -50,14 +50,12 @@
|
||||||
#include <linux/migrate.h>
|
#include <linux/migrate.h>
|
||||||
#include <linux/highmem.h>
|
#include <linux/highmem.h>
|
||||||
#include <linux/seq_file.h>
|
#include <linux/seq_file.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
|
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <asm/div64.h>
|
#include <asm/div64.h>
|
||||||
#include <asm/pgtable.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_PAGE (PAGE_CACHE_SIZE/sizeof(unsigned long))
|
||||||
#define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE)
|
#define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE)
|
||||||
#define BLOCKS_PER_PAGE (PAGE_CACHE_SIZE/512)
|
#define BLOCKS_PER_PAGE (PAGE_CACHE_SIZE/512)
|
||||||
|
|
|
@ -20,8 +20,7 @@
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <linux/namei.h>
|
#include <linux/namei.h>
|
||||||
#include <linux/security.h>
|
#include <linux/security.h>
|
||||||
|
#include <linux/magic.h>
|
||||||
#define SECURITYFS_MAGIC 0x73636673
|
|
||||||
|
|
||||||
static struct vfsmount *mount;
|
static struct vfsmount *mount;
|
||||||
static int mount_count;
|
static int mount_count;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче