Merge git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/sysctl-2.6: (43 commits) security/tomoyo: Remove now unnecessary handling of security_sysctl. security/tomoyo: Add a special case to handle accesses through the internal proc mount. sysctl: Drop & in front of every proc_handler. sysctl: Remove CTL_NONE and CTL_UNNUMBERED sysctl: kill dead ctl_handler definitions. sysctl: Remove the last of the generic binary sysctl support sysctl net: Remove unused binary sysctl code sysctl security/tomoyo: Don't look at ctl_name sysctl arm: Remove binary sysctl support sysctl x86: Remove dead binary sysctl support sysctl sh: Remove dead binary sysctl support sysctl powerpc: Remove dead binary sysctl support sysctl ia64: Remove dead binary sysctl support sysctl s390: Remove dead sysctl binary support sysctl frv: Remove dead binary sysctl support sysctl mips/lasat: Remove dead binary sysctl support sysctl drivers: Remove dead binary sysctl support sysctl crypto: Remove dead binary sysctl support sysctl security/keys: Remove dead binary sysctl support sysctl kernel: Remove binary sysctl logic ...
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
obj-y = sched.o fork.o exec_domain.o panic.o printk.o \
|
||||
cpu.o exit.o itimer.o time.o softirq.o resource.o \
|
||||
sysctl.o capability.o ptrace.o timer.o user.o \
|
||||
sysctl.o sysctl_binary.o capability.o ptrace.o timer.o user.o \
|
||||
signal.o sys.o kmod.o workqueue.o pid.o \
|
||||
rcupdate.o extable.o params.o posix-timers.o \
|
||||
kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
|
||||
|
@@ -7444,17 +7444,16 @@ static struct ctl_table sd_ctl_dir[] = {
|
||||
.procname = "sched_domain",
|
||||
.mode = 0555,
|
||||
},
|
||||
{0, },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct ctl_table sd_ctl_root[] = {
|
||||
{
|
||||
.ctl_name = CTL_KERN,
|
||||
.procname = "kernel",
|
||||
.mode = 0555,
|
||||
.child = sd_ctl_dir,
|
||||
},
|
||||
{0, },
|
||||
{}
|
||||
};
|
||||
|
||||
static struct ctl_table *sd_alloc_ctl_entry(int n)
|
||||
|
@@ -49,7 +49,6 @@ static const int slow_work_max_vslow = 99;
|
||||
|
||||
ctl_table slow_work_sysctls[] = {
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "min-threads",
|
||||
.data = &slow_work_min_threads,
|
||||
.maxlen = sizeof(unsigned),
|
||||
@@ -59,7 +58,6 @@ ctl_table slow_work_sysctls[] = {
|
||||
.extra2 = &slow_work_max_threads,
|
||||
},
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "max-threads",
|
||||
.data = &slow_work_max_threads,
|
||||
.maxlen = sizeof(unsigned),
|
||||
@@ -69,16 +67,15 @@ ctl_table slow_work_sysctls[] = {
|
||||
.extra2 = (void *) &slow_work_max_max_threads,
|
||||
},
|
||||
{
|
||||
.ctl_name = CTL_UNNUMBERED,
|
||||
.procname = "vslow-percentage",
|
||||
.data = &vslow_work_proportion,
|
||||
.maxlen = sizeof(unsigned),
|
||||
.mode = 0644,
|
||||
.proc_handler = &proc_dointvec_minmax,
|
||||
.proc_handler = proc_dointvec_minmax,
|
||||
.extra1 = (void *) &slow_work_min_vslow,
|
||||
.extra2 = (void *) &slow_work_max_vslow,
|
||||
},
|
||||
{ .ctl_name = 0 }
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@@ -139,7 +139,6 @@ cond_syscall(sys_pciconfig_read);
|
||||
cond_syscall(sys_pciconfig_write);
|
||||
cond_syscall(sys_pciconfig_iobase);
|
||||
cond_syscall(sys32_ipc);
|
||||
cond_syscall(sys32_sysctl);
|
||||
cond_syscall(ppc_rtas);
|
||||
cond_syscall(sys_spu_run);
|
||||
cond_syscall(sys_spu_create);
|
||||
|
893
kernel/sysctl.c
893
kernel/sysctl.c
File diff suppressed because it is too large
Load Diff
1507
kernel/sysctl_binary.c
Normal file
1507
kernel/sysctl_binary.c
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -57,78 +57,47 @@ static int proc_do_uts_string(ctl_table *table, int write,
|
||||
#define proc_do_uts_string NULL
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_SYSCTL_SYSCALL
|
||||
/* The generic string strategy routine: */
|
||||
static int sysctl_uts_string(ctl_table *table,
|
||||
void __user *oldval, size_t __user *oldlenp,
|
||||
void __user *newval, size_t newlen)
|
||||
{
|
||||
struct ctl_table uts_table;
|
||||
int r, write;
|
||||
write = newval && newlen;
|
||||
memcpy(&uts_table, table, sizeof(uts_table));
|
||||
uts_table.data = get_uts(table, write);
|
||||
r = sysctl_string(&uts_table, oldval, oldlenp, newval, newlen);
|
||||
put_uts(table, write, uts_table.data);
|
||||
return r;
|
||||
}
|
||||
#else
|
||||
#define sysctl_uts_string NULL
|
||||
#endif
|
||||
|
||||
static struct ctl_table uts_kern_table[] = {
|
||||
{
|
||||
.ctl_name = KERN_OSTYPE,
|
||||
.procname = "ostype",
|
||||
.data = init_uts_ns.name.sysname,
|
||||
.maxlen = sizeof(init_uts_ns.name.sysname),
|
||||
.mode = 0444,
|
||||
.proc_handler = proc_do_uts_string,
|
||||
.strategy = sysctl_uts_string,
|
||||
},
|
||||
{
|
||||
.ctl_name = KERN_OSRELEASE,
|
||||
.procname = "osrelease",
|
||||
.data = init_uts_ns.name.release,
|
||||
.maxlen = sizeof(init_uts_ns.name.release),
|
||||
.mode = 0444,
|
||||
.proc_handler = proc_do_uts_string,
|
||||
.strategy = sysctl_uts_string,
|
||||
},
|
||||
{
|
||||
.ctl_name = KERN_VERSION,
|
||||
.procname = "version",
|
||||
.data = init_uts_ns.name.version,
|
||||
.maxlen = sizeof(init_uts_ns.name.version),
|
||||
.mode = 0444,
|
||||
.proc_handler = proc_do_uts_string,
|
||||
.strategy = sysctl_uts_string,
|
||||
},
|
||||
{
|
||||
.ctl_name = KERN_NODENAME,
|
||||
.procname = "hostname",
|
||||
.data = init_uts_ns.name.nodename,
|
||||
.maxlen = sizeof(init_uts_ns.name.nodename),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_do_uts_string,
|
||||
.strategy = sysctl_uts_string,
|
||||
},
|
||||
{
|
||||
.ctl_name = KERN_DOMAINNAME,
|
||||
.procname = "domainname",
|
||||
.data = init_uts_ns.name.domainname,
|
||||
.maxlen = sizeof(init_uts_ns.name.domainname),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_do_uts_string,
|
||||
.strategy = sysctl_uts_string,
|
||||
},
|
||||
{}
|
||||
};
|
||||
|
||||
static struct ctl_table uts_root_table[] = {
|
||||
{
|
||||
.ctl_name = CTL_KERN,
|
||||
.procname = "kernel",
|
||||
.mode = 0555,
|
||||
.child = uts_kern_table,
|
||||
|
Reference in New Issue
Block a user