diff options
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/appldata/appldata_base.c | 4 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 53 | ||||
-rw-r--r-- | arch/s390/kernel/compat_linux.h | 2 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 6 | ||||
-rw-r--r-- | arch/s390/kernel/debug.c | 13 | ||||
-rw-r--r-- | arch/s390/mm/cmm.c | 11 |
6 files changed, 13 insertions, 76 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index b55fd7ed1c31..495589950dc7 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
@@ -61,12 +61,12 @@ static struct ctl_table appldata_table[] = { | |||
61 | { | 61 | { |
62 | .procname = "timer", | 62 | .procname = "timer", |
63 | .mode = S_IRUGO | S_IWUSR, | 63 | .mode = S_IRUGO | S_IWUSR, |
64 | .proc_handler = &appldata_timer_handler, | 64 | .proc_handler = appldata_timer_handler, |
65 | }, | 65 | }, |
66 | { | 66 | { |
67 | .procname = "interval", | 67 | .procname = "interval", |
68 | .mode = S_IRUGO | S_IWUSR, | 68 | .mode = S_IRUGO | S_IWUSR, |
69 | .proc_handler = &appldata_interval_handler, | 69 | .proc_handler = appldata_interval_handler, |
70 | }, | 70 | }, |
71 | { }, | 71 | { }, |
72 | }; | 72 | }; |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 0debcec23a39..fda1a8123f9b 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -527,59 +527,6 @@ asmlinkage long sys32_sendfile64(int out_fd, int in_fd, | |||
527 | return ret; | 527 | return ret; |
528 | } | 528 | } |
529 | 529 | ||
530 | #ifdef CONFIG_SYSCTL_SYSCALL | ||
531 | struct __sysctl_args32 { | ||
532 | u32 name; | ||
533 | int nlen; | ||
534 | u32 oldval; | ||
535 | u32 oldlenp; | ||
536 | u32 newval; | ||
537 | u32 newlen; | ||
538 | u32 __unused[4]; | ||
539 | }; | ||
540 | |||
541 | asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | ||
542 | { | ||
543 | struct __sysctl_args32 tmp; | ||
544 | int error; | ||
545 | size_t oldlen; | ||
546 | size_t __user *oldlenp = NULL; | ||
547 | unsigned long addr = (((unsigned long)&args->__unused[0]) + 7) & ~7; | ||
548 | |||
549 | if (copy_from_user(&tmp, args, sizeof(tmp))) | ||
550 | return -EFAULT; | ||
551 | |||
552 | if (tmp.oldval && tmp.oldlenp) { | ||
553 | /* Duh, this is ugly and might not work if sysctl_args | ||
554 | is in read-only memory, but do_sysctl does indirectly | ||
555 | a lot of uaccess in both directions and we'd have to | ||
556 | basically copy the whole sysctl.c here, and | ||
557 | glibc's __sysctl uses rw memory for the structure | ||
558 | anyway. */ | ||
559 | if (get_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp)) || | ||
560 | put_user(oldlen, (size_t __user *)addr)) | ||
561 | return -EFAULT; | ||
562 | oldlenp = (size_t __user *)addr; | ||
563 | } | ||
564 | |||
565 | lock_kernel(); | ||
566 | error = do_sysctl(compat_ptr(tmp.name), tmp.nlen, compat_ptr(tmp.oldval), | ||
567 | oldlenp, compat_ptr(tmp.newval), tmp.newlen); | ||
568 | unlock_kernel(); | ||
569 | if (oldlenp) { | ||
570 | if (!error) { | ||
571 | if (get_user(oldlen, (size_t __user *)addr) || | ||
572 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) | ||
573 | error = -EFAULT; | ||
574 | } | ||
575 | if (copy_to_user(args->__unused, tmp.__unused, | ||
576 | sizeof(tmp.__unused))) | ||
577 | error = -EFAULT; | ||
578 | } | ||
579 | return error; | ||
580 | } | ||
581 | #endif | ||
582 | |||
583 | struct stat64_emu31 { | 530 | struct stat64_emu31 { |
584 | unsigned long long st_dev; | 531 | unsigned long long st_dev; |
585 | unsigned int __pad1; | 532 | unsigned int __pad1; |
diff --git a/arch/s390/kernel/compat_linux.h b/arch/s390/kernel/compat_linux.h index c07f9ca05ade..45e9092b3aad 100644 --- a/arch/s390/kernel/compat_linux.h +++ b/arch/s390/kernel/compat_linux.h | |||
@@ -162,7 +162,6 @@ struct ucontext32 { | |||
162 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ | 162 | compat_sigset_t uc_sigmask; /* mask last for extensibility */ |
163 | }; | 163 | }; |
164 | 164 | ||
165 | struct __sysctl_args32; | ||
166 | struct stat64_emu31; | 165 | struct stat64_emu31; |
167 | struct mmap_arg_struct_emu31; | 166 | struct mmap_arg_struct_emu31; |
168 | struct fadvise64_64_args; | 167 | struct fadvise64_64_args; |
@@ -212,7 +211,6 @@ long sys32_sendfile(int out_fd, int in_fd, compat_off_t __user *offset, | |||
212 | size_t count); | 211 | size_t count); |
213 | long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, | 212 | long sys32_sendfile64(int out_fd, int in_fd, compat_loff_t __user *offset, |
214 | s32 count); | 213 | s32 count); |
215 | long sys32_sysctl(struct __sysctl_args32 __user *args); | ||
216 | long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf); | 214 | long sys32_stat64(char __user * filename, struct stat64_emu31 __user * statbuf); |
217 | long sys32_lstat64(char __user * filename, | 215 | long sys32_lstat64(char __user * filename, |
218 | struct stat64_emu31 __user * statbuf); | 216 | struct stat64_emu31 __user * statbuf); |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cbd9901dc0f8..30de2d0e52bb 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -689,8 +689,6 @@ sys32_fdatasync_wrapper: | |||
689 | llgfr %r2,%r2 # unsigned int | 689 | llgfr %r2,%r2 # unsigned int |
690 | jg sys_fdatasync # branch to system call | 690 | jg sys_fdatasync # branch to system call |
691 | 691 | ||
692 | #sys32_sysctl_wrapper # tbd | ||
693 | |||
694 | .globl sys32_mlock_wrapper | 692 | .globl sys32_mlock_wrapper |
695 | sys32_mlock_wrapper: | 693 | sys32_mlock_wrapper: |
696 | llgfr %r2,%r2 # unsigned long | 694 | llgfr %r2,%r2 # unsigned long |
@@ -1087,8 +1085,8 @@ sys32_stime_wrapper: | |||
1087 | 1085 | ||
1088 | .globl sys32_sysctl_wrapper | 1086 | .globl sys32_sysctl_wrapper |
1089 | sys32_sysctl_wrapper: | 1087 | sys32_sysctl_wrapper: |
1090 | llgtr %r2,%r2 # struct __sysctl_args32 * | 1088 | llgtr %r2,%r2 # struct compat_sysctl_args * |
1091 | jg sys32_sysctl | 1089 | jg compat_sys_sysctl |
1092 | 1090 | ||
1093 | .globl sys32_fstat64_wrapper | 1091 | .globl sys32_fstat64_wrapper |
1094 | sys32_fstat64_wrapper: | 1092 | sys32_fstat64_wrapper: |
diff --git a/arch/s390/kernel/debug.c b/arch/s390/kernel/debug.c index 20f282c911c2..071c81f179ef 100644 --- a/arch/s390/kernel/debug.c +++ b/arch/s390/kernel/debug.c | |||
@@ -893,35 +893,30 @@ s390dbf_procactive(ctl_table *table, int write, | |||
893 | 893 | ||
894 | static struct ctl_table s390dbf_table[] = { | 894 | static struct ctl_table s390dbf_table[] = { |
895 | { | 895 | { |
896 | .ctl_name = CTL_S390DBF_STOPPABLE, | ||
897 | .procname = "debug_stoppable", | 896 | .procname = "debug_stoppable", |
898 | .data = &debug_stoppable, | 897 | .data = &debug_stoppable, |
899 | .maxlen = sizeof(int), | 898 | .maxlen = sizeof(int), |
900 | .mode = S_IRUGO | S_IWUSR, | 899 | .mode = S_IRUGO | S_IWUSR, |
901 | .proc_handler = &proc_dointvec, | 900 | .proc_handler = proc_dointvec, |
902 | .strategy = &sysctl_intvec, | ||
903 | }, | 901 | }, |
904 | { | 902 | { |
905 | .ctl_name = CTL_S390DBF_ACTIVE, | ||
906 | .procname = "debug_active", | 903 | .procname = "debug_active", |
907 | .data = &debug_active, | 904 | .data = &debug_active, |
908 | .maxlen = sizeof(int), | 905 | .maxlen = sizeof(int), |
909 | .mode = S_IRUGO | S_IWUSR, | 906 | .mode = S_IRUGO | S_IWUSR, |
910 | .proc_handler = &s390dbf_procactive, | 907 | .proc_handler = s390dbf_procactive, |
911 | .strategy = &sysctl_intvec, | ||
912 | }, | 908 | }, |
913 | { .ctl_name = 0 } | 909 | { } |
914 | }; | 910 | }; |
915 | 911 | ||
916 | static struct ctl_table s390dbf_dir_table[] = { | 912 | static struct ctl_table s390dbf_dir_table[] = { |
917 | { | 913 | { |
918 | .ctl_name = CTL_S390DBF, | ||
919 | .procname = "s390dbf", | 914 | .procname = "s390dbf", |
920 | .maxlen = 0, | 915 | .maxlen = 0, |
921 | .mode = S_IRUGO | S_IXUGO, | 916 | .mode = S_IRUGO | S_IXUGO, |
922 | .child = s390dbf_table, | 917 | .child = s390dbf_table, |
923 | }, | 918 | }, |
924 | { .ctl_name = 0 } | 919 | { } |
925 | }; | 920 | }; |
926 | 921 | ||
927 | static struct ctl_table_header *s390dbf_sysctl_header; | 922 | static struct ctl_table_header *s390dbf_sysctl_header; |
diff --git a/arch/s390/mm/cmm.c b/arch/s390/mm/cmm.c index b201135cc18c..ff58779bf7e9 100644 --- a/arch/s390/mm/cmm.c +++ b/arch/s390/mm/cmm.c | |||
@@ -343,30 +343,29 @@ static struct ctl_table cmm_table[] = { | |||
343 | { | 343 | { |
344 | .procname = "cmm_pages", | 344 | .procname = "cmm_pages", |
345 | .mode = 0644, | 345 | .mode = 0644, |
346 | .proc_handler = &cmm_pages_handler, | 346 | .proc_handler = cmm_pages_handler, |
347 | }, | 347 | }, |
348 | { | 348 | { |
349 | .procname = "cmm_timed_pages", | 349 | .procname = "cmm_timed_pages", |
350 | .mode = 0644, | 350 | .mode = 0644, |
351 | .proc_handler = &cmm_pages_handler, | 351 | .proc_handler = cmm_pages_handler, |
352 | }, | 352 | }, |
353 | { | 353 | { |
354 | .procname = "cmm_timeout", | 354 | .procname = "cmm_timeout", |
355 | .mode = 0644, | 355 | .mode = 0644, |
356 | .proc_handler = &cmm_timeout_handler, | 356 | .proc_handler = cmm_timeout_handler, |
357 | }, | 357 | }, |
358 | { .ctl_name = 0 } | 358 | { } |
359 | }; | 359 | }; |
360 | 360 | ||
361 | static struct ctl_table cmm_dir_table[] = { | 361 | static struct ctl_table cmm_dir_table[] = { |
362 | { | 362 | { |
363 | .ctl_name = CTL_VM, | ||
364 | .procname = "vm", | 363 | .procname = "vm", |
365 | .maxlen = 0, | 364 | .maxlen = 0, |
366 | .mode = 0555, | 365 | .mode = 0555, |
367 | .child = cmm_table, | 366 | .child = cmm_table, |
368 | }, | 367 | }, |
369 | { .ctl_name = 0 } | 368 | { } |
370 | }; | 369 | }; |
371 | #endif | 370 | #endif |
372 | 371 | ||