#include <linux/stat.h>
#include <linux/sysctl.h>
#include "../fs/xfs/xfs_sysctl.h"
#include <linux/sunrpc/debug.h>
#include <linux/string.h>
#include <linux/syscalls.h>
#include <linux/namei.h>
#include <linux/mount.h>
#include <linux/fs.h>
#include <linux/nsproxy.h>
#include <linux/pid_namespace.h>
#include <linux/file.h>
#include <linux/ctype.h>
#include <linux/netdevice.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/compat.h>
#ifdef CONFIG_SYSCTL_SYSCALL
struct bin_table;
typedef ssize_t bin_convert_t(struct file *file,
void __user *oldval, size_t oldlen, void __user *newval, size_t newlen);
static bin_convert_t bin_dir;
static bin_convert_t bin_string;
static bin_convert_t bin_intvec;
static bin_convert_t bin_ulongvec;
static bin_convert_t bin_uuid;
static bin_convert_t bin_dn_node_address;
#define CTL_DIR bin_dir
#define CTL_STR bin_string
#define CTL_INT bin_intvec
#define CTL_ULONG bin_ulongvec
#define CTL_UUID bin_uuid
#define CTL_DNADR bin_dn_node_address
#define BUFSZ 256
struct bin_table {
bin_convert_t *convert;
int ctl_name;
const char *procname;
const struct bin_table *child;
};
static const struct bin_table bin_random_table[] = {
{ CTL_INT, RANDOM_POOLSIZE, "poolsize" },
{ CTL_INT, RANDOM_ENTROPY_COUNT, "entropy_avail" },
{ CTL_INT, RANDOM_READ_THRESH, "read_wakeup_threshold" },
{ CTL_INT, RANDOM_WRITE_THRESH, "write_wakeup_threshold" },
{ CTL_UUID, RANDOM_BOOT_ID, "boot_id" },
{ CTL_UUID, RANDOM_UUID, "uuid" },
{}
};
static const struct bin_table bin_pty_table[] = {
{ CTL_INT, PTY_MAX, "max" },
{ CTL_INT, PTY_NR, "nr" },
{}
};
static const struct bin_table bin_kern_table[] = {
{ CTL_STR, KERN_OSTYPE, "ostype" },
{ CTL_STR, KERN_OSRELEASE, "osrelease" },
/* KERN_OSREV not used */
{ CTL_STR, KERN_VERSION, "version" },
/* KERN_SECUREMASK not used */
/* KERN_PROF not used */
{ CTL_STR, KERN_NODENAME, "hostname" },
{ CTL_STR, KERN_DOMAINNAME, "domainname" },
{ CTL_INT, KERN_PANIC, "panic" },
{ CTL_INT, KERN_REALROOTDEV, "real-root-dev" },
{ CTL_STR, KERN_SPARC_REBOOT, "reboot-cmd" },
{ CTL_INT, KERN_CTLALTDEL, "ctrl-alt-del" },
{ CTL_INT, KERN_PRINTK, "printk" },
/* KERN_NAMETRANS not used */
/* KERN_PPC_HTABRECLAIM not used */
/* KERN_PPC_ZEROPAGED not used */
{ CTL_INT, KERN_PPC_POWERSAVE_NAP, "powersave-nap" },
{ CTL_STR, KERN_MODPROBE, "modprobe" },
{ CTL_INT, KERN_SG_BIG_BUFF, "sg-big-buff" },
{ CTL_INT, KERN_ACCT, "acct" },
/* KERN_PPC_L2CR "l2cr" no longer used */
/* KERN_RTSIGNR not used */
/* KERN_RTSIGMAX not used */
{ CTL_ULONG, KERN_SHMMAX, "shmmax" },
{ CTL_INT, KERN_MSGMAX, "msgmax" },
{ CTL_INT, KERN_MSGMNB, "msgmnb" },
/* KERN_MSGPOOL not used*/
{ CTL_INT, KERN_SYSRQ,
|