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:
@@ -591,63 +591,6 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
struct __sysctl_args32 {
|
||||
u32 name;
|
||||
int nlen;
|
||||
u32 oldval;
|
||||
u32 oldlenp;
|
||||
u32 newval;
|
||||
u32 newlen;
|
||||
u32 __unused[4];
|
||||
};
|
||||
|
||||
asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args)
|
||||
{
|
||||
#ifndef CONFIG_SYSCTL_SYSCALL
|
||||
return -ENOSYS;
|
||||
#else
|
||||
struct __sysctl_args32 tmp;
|
||||
int error;
|
||||
size_t oldlen, __user *oldlenp = NULL;
|
||||
unsigned long addr = (((unsigned long)&args->__unused[0]) + 7UL) & ~7UL;
|
||||
|
||||
if (copy_from_user(&tmp, args, sizeof(tmp)))
|
||||
return -EFAULT;
|
||||
|
||||
if (tmp.oldval && tmp.oldlenp) {
|
||||
/* Duh, this is ugly and might not work if sysctl_args
|
||||
is in read-only memory, but do_sysctl does indirectly
|
||||
a lot of uaccess in both directions and we'd have to
|
||||
basically copy the whole sysctl.c here, and
|
||||
glibc's __sysctl uses rw memory for the structure
|
||||
anyway. */
|
||||
if (get_user(oldlen, (u32 __user *)(unsigned long)tmp.oldlenp) ||
|
||||
put_user(oldlen, (size_t __user *)addr))
|
||||
return -EFAULT;
|
||||
oldlenp = (size_t __user *)addr;
|
||||
}
|
||||
|
||||
lock_kernel();
|
||||
error = do_sysctl((int __user *)(unsigned long) tmp.name,
|
||||
tmp.nlen,
|
||||
(void __user *)(unsigned long) tmp.oldval,
|
||||
oldlenp,
|
||||
(void __user *)(unsigned long) tmp.newval,
|
||||
tmp.newlen);
|
||||
unlock_kernel();
|
||||
if (oldlenp) {
|
||||
if (!error) {
|
||||
if (get_user(oldlen, (size_t __user *)addr) ||
|
||||
put_user(oldlen, (u32 __user *)(unsigned long) tmp.oldlenp))
|
||||
error = -EFAULT;
|
||||
}
|
||||
if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)))
|
||||
error = -EFAULT;
|
||||
}
|
||||
return error;
|
||||
#endif
|
||||
}
|
||||
|
||||
long sys32_lookup_dcookie(unsigned long cookie_high,
|
||||
unsigned long cookie_low,
|
||||
char __user *buf, size_t len)
|
||||
|
@@ -68,7 +68,7 @@ sys_call_table32:
|
||||
.word compat_sys_fstatfs64, sys_llseek, sys_mlock, sys_munlock, sys32_mlockall
|
||||
/*240*/ .word sys_munlockall, sys32_sched_setparam, sys32_sched_getparam, sys32_sched_setscheduler, sys32_sched_getscheduler
|
||||
.word sys_sched_yield, sys32_sched_get_priority_max, sys32_sched_get_priority_min, sys32_sched_rr_get_interval, compat_sys_nanosleep
|
||||
/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
|
||||
/*250*/ .word sys32_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
|
||||
.word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
|
||||
/*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
|
||||
.word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
|
||||
|
Reference in New Issue
Block a user