diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:38:50 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:38:50 -0500 |
commit | 1557d33007f63dd96e5d15f33af389378e5f2e54 (patch) | |
tree | 06d05722b2ba5d2a67532f779fa8a88efe3c88f1 /arch/parisc | |
parent | 6ec22f9b037fc0c2e00ddb7023fad279c365324d (diff) | |
parent | c656ae95d1c5c8ed5763356263ace2d03087efec (diff) |
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
...
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/sys_parisc32.c | 71 | ||||
-rw-r--r-- | arch/parisc/kernel/syscall_table.S | 2 |
2 files changed, 1 insertions, 72 deletions
diff --git a/arch/parisc/kernel/sys_parisc32.c b/arch/parisc/kernel/sys_parisc32.c index 561388b17c91..76d23ec8dfaa 100644 --- a/arch/parisc/kernel/sys_parisc32.c +++ b/arch/parisc/kernel/sys_parisc32.c | |||
@@ -90,77 +90,6 @@ asmlinkage long sys32_unimplemented(int r26, int r25, int r24, int r23, | |||
90 | return -ENOSYS; | 90 | return -ENOSYS; |
91 | } | 91 | } |
92 | 92 | ||
93 | #ifdef CONFIG_SYSCTL | ||
94 | |||
95 | struct __sysctl_args32 { | ||
96 | u32 name; | ||
97 | int nlen; | ||
98 | u32 oldval; | ||
99 | u32 oldlenp; | ||
100 | u32 newval; | ||
101 | u32 newlen; | ||
102 | u32 __unused[4]; | ||
103 | }; | ||
104 | |||
105 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | ||
106 | { | ||
107 | #ifndef CONFIG_SYSCTL_SYSCALL | ||
108 | return -ENOSYS; | ||
109 | #else | ||
110 | struct __sysctl_args32 tmp; | ||
111 | int error; | ||
112 | unsigned int oldlen32; | ||
113 | size_t oldlen, __user *oldlenp = NULL; | ||
114 | unsigned long addr = (((long __force)&args->__unused[0]) + 7) & ~7; | ||
115 | |||
116 | DBG(("sysctl32(%p)\n", args)); | ||
117 | |||
118 | if (copy_from_user(&tmp, args, sizeof(tmp))) | ||
119 | return -EFAULT; | ||
120 | |||
121 | if (tmp.oldval && tmp.oldlenp) { | ||
122 | /* Duh, this is ugly and might not work if sysctl_args | ||
123 | is in read-only memory, but do_sysctl does indirectly | ||
124 | a lot of uaccess in both directions and we'd have to | ||
125 | basically copy the whole sysctl.c here, and | ||
126 | glibc's __sysctl uses rw memory for the structure | ||
127 | anyway. */ | ||
128 | /* a possibly better hack than this, which will avoid the | ||
129 | * problem if the struct is read only, is to push the | ||
130 | * 'oldlen' value out to the user's stack instead. -PB | ||
131 | */ | ||
132 | if (get_user(oldlen32, (u32 *)(u64)tmp.oldlenp)) | ||
133 | return -EFAULT; | ||
134 | oldlen = oldlen32; | ||
135 | if (put_user(oldlen, (size_t *)addr)) | ||
136 | return -EFAULT; | ||
137 | oldlenp = (size_t *)addr; | ||
138 | } | ||
139 | |||
140 | lock_kernel(); | ||
141 | error = do_sysctl((int __user *)(u64)tmp.name, tmp.nlen, | ||
142 | (void __user *)(u64)tmp.oldval, oldlenp, | ||
143 | (void __user *)(u64)tmp.newval, tmp.newlen); | ||
144 | unlock_kernel(); | ||
145 | if (oldlenp) { | ||
146 | if (!error) { | ||
147 | if (get_user(oldlen, (size_t *)addr)) { | ||
148 | error = -EFAULT; | ||
149 | } else { | ||
150 | oldlen32 = oldlen; | ||
151 | if (put_user(oldlen32, (u32 *)(u64)tmp.oldlenp)) | ||
152 | error = -EFAULT; | ||
153 | } | ||
154 | } | ||
155 | if (copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused))) | ||
156 | error = -EFAULT; | ||
157 | } | ||
158 | return error; | ||
159 | #endif | ||
160 | } | ||
161 | |||
162 | #endif /* CONFIG_SYSCTL */ | ||
163 | |||
164 | asmlinkage long sys32_sched_rr_get_interval(pid_t pid, | 93 | asmlinkage long sys32_sched_rr_get_interval(pid_t pid, |
165 | struct compat_timespec __user *interval) | 94 | struct compat_timespec __user *interval) |
166 | { | 95 | { |
diff --git a/arch/parisc/kernel/syscall_table.S b/arch/parisc/kernel/syscall_table.S index 843f423dec67..01c4fcf8f481 100644 --- a/arch/parisc/kernel/syscall_table.S +++ b/arch/parisc/kernel/syscall_table.S | |||
@@ -234,7 +234,7 @@ | |||
234 | ENTRY_SAME(getsid) | 234 | ENTRY_SAME(getsid) |
235 | ENTRY_SAME(fdatasync) | 235 | ENTRY_SAME(fdatasync) |
236 | /* struct __sysctl_args is a mess */ | 236 | /* struct __sysctl_args is a mess */ |
237 | ENTRY_DIFF(sysctl) | 237 | ENTRY_COMP(sysctl) |
238 | ENTRY_SAME(mlock) /* 150 */ | 238 | ENTRY_SAME(mlock) /* 150 */ |
239 | ENTRY_SAME(munlock) | 239 | ENTRY_SAME(munlock) |
240 | ENTRY_SAME(mlockall) | 240 | ENTRY_SAME(mlockall) |