aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:38:50 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-08 10:38:50 -0500
commit1557d33007f63dd96e5d15f33af389378e5f2e54 (patch)
tree06d05722b2ba5d2a67532f779fa8a88efe3c88f1 /arch/ia64
parent6ec22f9b037fc0c2e00ddb7023fad279c365324d (diff)
parentc656ae95d1c5c8ed5763356263ace2d03087efec (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/ia64')
-rw-r--r--arch/ia64/ia32/ia32_entry.S2
-rw-r--r--arch/ia64/ia32/sys_ia32.c55
-rw-r--r--arch/ia64/kernel/crash.c11
-rw-r--r--arch/ia64/kernel/perfmon.c14
4 files changed, 9 insertions, 73 deletions
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S
index af9405cd70e5..10c37510f4b4 100644
--- a/arch/ia64/ia32/ia32_entry.S
+++ b/arch/ia64/ia32/ia32_entry.S
@@ -327,7 +327,7 @@ ia32_syscall_table:
327 data8 compat_sys_writev 327 data8 compat_sys_writev
328 data8 sys_getsid 328 data8 sys_getsid
329 data8 sys_fdatasync 329 data8 sys_fdatasync
330 data8 sys32_sysctl 330 data8 compat_sys_sysctl
331 data8 sys_mlock /* 150 */ 331 data8 sys_mlock /* 150 */
332 data8 sys_munlock 332 data8 sys_munlock
333 data8 sys_mlockall 333 data8 sys_mlockall
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c
index 625ed8f76fce..429ec968c9ee 100644
--- a/arch/ia64/ia32/sys_ia32.c
+++ b/arch/ia64/ia32/sys_ia32.c
@@ -1628,61 +1628,6 @@ sys32_msync (unsigned int start, unsigned int len, int flags)
1628 return sys_msync(addr, len + (start - addr), flags); 1628 return sys_msync(addr, len + (start - addr), flags);
1629} 1629}
1630 1630
1631struct sysctl32 {
1632 unsigned int name;
1633 int nlen;
1634 unsigned int oldval;
1635 unsigned int oldlenp;
1636 unsigned int newval;
1637 unsigned int newlen;
1638 unsigned int __unused[4];
1639};
1640
1641#ifdef CONFIG_SYSCTL_SYSCALL
1642asmlinkage long
1643sys32_sysctl (struct sysctl32 __user *args)
1644{
1645 struct sysctl32 a32;
1646 mm_segment_t old_fs = get_fs ();
1647 void __user *oldvalp, *newvalp;
1648 size_t oldlen;
1649 int __user *namep;
1650 long ret;
1651
1652 if (copy_from_user(&a32, args, sizeof(a32)))
1653 return -EFAULT;
1654
1655 /*
1656 * We need to pre-validate these because we have to disable address checking
1657 * before calling do_sysctl() because of OLDLEN but we can't run the risk of the
1658 * user specifying bad addresses here. Well, since we're dealing with 32 bit
1659 * addresses, we KNOW that access_ok() will always succeed, so this is an
1660 * expensive NOP, but so what...
1661 */
1662 namep = (int __user *) compat_ptr(a32.name);
1663 oldvalp = compat_ptr(a32.oldval);
1664 newvalp = compat_ptr(a32.newval);
1665
1666 if ((oldvalp && get_user(oldlen, (int __user *) compat_ptr(a32.oldlenp)))
1667 || !access_ok(VERIFY_WRITE, namep, 0)
1668 || !access_ok(VERIFY_WRITE, oldvalp, 0)
1669 || !access_ok(VERIFY_WRITE, newvalp, 0))
1670 return -EFAULT;
1671
1672 set_fs(KERNEL_DS);
1673 lock_kernel();
1674 ret = do_sysctl(namep, a32.nlen, oldvalp, (size_t __user *) &oldlen,
1675 newvalp, (size_t) a32.newlen);
1676 unlock_kernel();
1677 set_fs(old_fs);
1678
1679 if (oldvalp && put_user (oldlen, (int __user *) compat_ptr(a32.oldlenp)))
1680 return -EFAULT;
1681
1682 return ret;
1683}
1684#endif
1685
1686asmlinkage long 1631asmlinkage long
1687sys32_newuname (struct new_utsname __user *name) 1632sys32_newuname (struct new_utsname __user *name)
1688{ 1633{
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 6631a9dfafdc..b942f4032d7a 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -239,32 +239,29 @@ kdump_init_notifier(struct notifier_block *self, unsigned long val, void *data)
239#ifdef CONFIG_SYSCTL 239#ifdef CONFIG_SYSCTL
240static ctl_table kdump_ctl_table[] = { 240static ctl_table kdump_ctl_table[] = {
241 { 241 {
242 .ctl_name = CTL_UNNUMBERED,
243 .procname = "kdump_on_init", 242 .procname = "kdump_on_init",
244 .data = &kdump_on_init, 243 .data = &kdump_on_init,
245 .maxlen = sizeof(int), 244 .maxlen = sizeof(int),
246 .mode = 0644, 245 .mode = 0644,
247 .proc_handler = &proc_dointvec, 246 .proc_handler = proc_dointvec,
248 }, 247 },
249 { 248 {
250 .ctl_name = CTL_UNNUMBERED,
251 .procname = "kdump_on_fatal_mca", 249 .procname = "kdump_on_fatal_mca",
252 .data = &kdump_on_fatal_mca, 250 .data = &kdump_on_fatal_mca,
253 .maxlen = sizeof(int), 251 .maxlen = sizeof(int),
254 .mode = 0644, 252 .mode = 0644,
255 .proc_handler = &proc_dointvec, 253 .proc_handler = proc_dointvec,
256 }, 254 },
257 { .ctl_name = 0 } 255 { }
258}; 256};
259 257
260static ctl_table sys_table[] = { 258static ctl_table sys_table[] = {
261 { 259 {
262 .ctl_name = CTL_KERN,
263 .procname = "kernel", 260 .procname = "kernel",
264 .mode = 0555, 261 .mode = 0555,
265 .child = kdump_ctl_table, 262 .child = kdump_ctl_table,
266 }, 263 },
267 { .ctl_name = 0 } 264 { }
268}; 265};
269#endif 266#endif
270 267
diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c
index f1782705b1f7..402698b6689f 100644
--- a/arch/ia64/kernel/perfmon.c
+++ b/arch/ia64/kernel/perfmon.c
@@ -522,42 +522,37 @@ EXPORT_SYMBOL(pfm_sysctl);
522 522
523static ctl_table pfm_ctl_table[]={ 523static ctl_table pfm_ctl_table[]={
524 { 524 {
525 .ctl_name = CTL_UNNUMBERED,
526 .procname = "debug", 525 .procname = "debug",
527 .data = &pfm_sysctl.debug, 526 .data = &pfm_sysctl.debug,
528 .maxlen = sizeof(int), 527 .maxlen = sizeof(int),
529 .mode = 0666, 528 .mode = 0666,
530 .proc_handler = &proc_dointvec, 529 .proc_handler = proc_dointvec,
531 }, 530 },
532 { 531 {
533 .ctl_name = CTL_UNNUMBERED,
534 .procname = "debug_ovfl", 532 .procname = "debug_ovfl",
535 .data = &pfm_sysctl.debug_ovfl, 533 .data = &pfm_sysctl.debug_ovfl,
536 .maxlen = sizeof(int), 534 .maxlen = sizeof(int),
537 .mode = 0666, 535 .mode = 0666,
538 .proc_handler = &proc_dointvec, 536 .proc_handler = proc_dointvec,
539 }, 537 },
540 { 538 {
541 .ctl_name = CTL_UNNUMBERED,
542 .procname = "fastctxsw", 539 .procname = "fastctxsw",
543 .data = &pfm_sysctl.fastctxsw, 540 .data = &pfm_sysctl.fastctxsw,
544 .maxlen = sizeof(int), 541 .maxlen = sizeof(int),
545 .mode = 0600, 542 .mode = 0600,
546 .proc_handler = &proc_dointvec, 543 .proc_handler = proc_dointvec,
547 }, 544 },
548 { 545 {
549 .ctl_name = CTL_UNNUMBERED,
550 .procname = "expert_mode", 546 .procname = "expert_mode",
551 .data = &pfm_sysctl.expert_mode, 547 .data = &pfm_sysctl.expert_mode,
552 .maxlen = sizeof(int), 548 .maxlen = sizeof(int),
553 .mode = 0600, 549 .mode = 0600,
554 .proc_handler = &proc_dointvec, 550 .proc_handler = proc_dointvec,
555 }, 551 },
556 {} 552 {}
557}; 553};
558static ctl_table pfm_sysctl_dir[] = { 554static ctl_table pfm_sysctl_dir[] = {
559 { 555 {
560 .ctl_name = CTL_UNNUMBERED,
561 .procname = "perfmon", 556 .procname = "perfmon",
562 .mode = 0555, 557 .mode = 0555,
563 .child = pfm_ctl_table, 558 .child = pfm_ctl_table,
@@ -566,7 +561,6 @@ static ctl_table pfm_sysctl_dir[] = {
566}; 561};
567static ctl_table pfm_sysctl_root[] = { 562static ctl_table pfm_sysctl_root[] = {
568 { 563 {
569 .ctl_name = CTL_KERN,
570 .procname = "kernel", 564 .procname = "kernel",
571 .mode = 0555, 565 .mode = 0555,
572 .child = pfm_sysctl_dir, 566 .child = pfm_sysctl_dir,