diff options
Diffstat (limited to 'arch/s390')
| -rw-r--r-- | arch/s390/appldata/appldata_base.c | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_linux.c | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_signal.c | 12 | ||||
| -rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/signal.c | 12 | ||||
| -rw-r--r-- | arch/s390/kernel/traps.c | 20 | ||||
| -rw-r--r-- | arch/s390/kernel/vmlinux.lds.S | 8 |
7 files changed, 31 insertions, 28 deletions
diff --git a/arch/s390/appldata/appldata_base.c b/arch/s390/appldata/appldata_base.c index 45c9fa7d7545..af1e8fc7d985 100644 --- a/arch/s390/appldata/appldata_base.c +++ b/arch/s390/appldata/appldata_base.c | |||
| @@ -310,6 +310,7 @@ appldata_interval_handler(ctl_table *ctl, int write, struct file *filp, | |||
| 310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { | 310 | if (copy_from_user(buf, buffer, len > sizeof(buf) ? sizeof(buf) : len)) { |
| 311 | return -EFAULT; | 311 | return -EFAULT; |
| 312 | } | 312 | } |
| 313 | interval = 0; | ||
| 313 | sscanf(buf, "%i", &interval); | 314 | sscanf(buf, "%i", &interval); |
| 314 | if (interval <= 0) { | 315 | if (interval <= 0) { |
| 315 | P_ERROR("Timer CPU interval has to be > 0!\n"); | 316 | P_ERROR("Timer CPU interval has to be > 0!\n"); |
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index 2001767e1dc7..5b33f823863a 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
| @@ -757,7 +757,9 @@ asmlinkage long sys32_sysctl(struct __sysctl_args32 __user *args) | |||
| 757 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) | 757 | put_user(oldlen, (u32 __user *)compat_ptr(tmp.oldlenp))) |
| 758 | error = -EFAULT; | 758 | error = -EFAULT; |
| 759 | } | 759 | } |
| 760 | copy_to_user(args->__unused, tmp.__unused, sizeof(tmp.__unused)); | 760 | if (copy_to_user(args->__unused, tmp.__unused, |
| 761 | sizeof(tmp.__unused))) | ||
| 762 | error = -EFAULT; | ||
| 761 | } | 763 | } |
| 762 | return error; | 764 | return error; |
| 763 | } | 765 | } |
diff --git a/arch/s390/kernel/compat_signal.c b/arch/s390/kernel/compat_signal.c index d49b876a83bf..861888ab8c13 100644 --- a/arch/s390/kernel/compat_signal.c +++ b/arch/s390/kernel/compat_signal.c | |||
| @@ -169,12 +169,12 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
| 169 | compat_old_sigset_t mask; | 169 | compat_old_sigset_t mask; |
| 170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 170 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
| 171 | __get_user(sa_handler, &act->sa_handler) || | 171 | __get_user(sa_handler, &act->sa_handler) || |
| 172 | __get_user(sa_restorer, &act->sa_restorer)) | 172 | __get_user(sa_restorer, &act->sa_restorer) || |
| 173 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
| 174 | __get_user(mask, &act->sa_mask)) | ||
| 173 | return -EFAULT; | 175 | return -EFAULT; |
| 174 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; | 176 | new_ka.sa.sa_handler = (__sighandler_t) sa_handler; |
| 175 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; | 177 | new_ka.sa.sa_restorer = (void (*)(void)) sa_restorer; |
| 176 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
| 177 | __get_user(mask, &act->sa_mask); | ||
| 178 | siginitset(&new_ka.sa.sa_mask, mask); | 178 | siginitset(&new_ka.sa.sa_mask, mask); |
| 179 | } | 179 | } |
| 180 | 180 | ||
| @@ -185,10 +185,10 @@ sys32_sigaction(int sig, const struct old_sigaction32 __user *act, | |||
| 185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; | 185 | sa_restorer = (unsigned long) old_ka.sa.sa_restorer; |
| 186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 186 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
| 187 | __put_user(sa_handler, &oact->sa_handler) || | 187 | __put_user(sa_handler, &oact->sa_handler) || |
| 188 | __put_user(sa_restorer, &oact->sa_restorer)) | 188 | __put_user(sa_restorer, &oact->sa_restorer) || |
| 189 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
| 190 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
| 189 | return -EFAULT; | 191 | return -EFAULT; |
| 190 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
| 191 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
| 192 | } | 192 | } |
| 193 | 193 | ||
| 194 | return ret; | 194 | return ret; |
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index cb0efae6802f..71e54ef0931e 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
| @@ -1664,4 +1664,4 @@ sys_getcpu_wrapper: | |||
| 1664 | llgtr %r2,%r2 # unsigned * | 1664 | llgtr %r2,%r2 # unsigned * |
| 1665 | llgtr %r3,%r3 # unsigned * | 1665 | llgtr %r3,%r3 # unsigned * |
| 1666 | llgtr %r4,%r4 # struct getcpu_cache * | 1666 | llgtr %r4,%r4 # struct getcpu_cache * |
| 1667 | jg sys_tee | 1667 | jg sys_getcpu |
diff --git a/arch/s390/kernel/signal.c b/arch/s390/kernel/signal.c index 4392a77cbae8..4c8a7954ef48 100644 --- a/arch/s390/kernel/signal.c +++ b/arch/s390/kernel/signal.c | |||
| @@ -80,10 +80,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
| 80 | old_sigset_t mask; | 80 | old_sigset_t mask; |
| 81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || | 81 | if (!access_ok(VERIFY_READ, act, sizeof(*act)) || |
| 82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || | 82 | __get_user(new_ka.sa.sa_handler, &act->sa_handler) || |
| 83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer)) | 83 | __get_user(new_ka.sa.sa_restorer, &act->sa_restorer) || |
| 84 | __get_user(new_ka.sa.sa_flags, &act->sa_flags) || | ||
| 85 | __get_user(mask, &act->sa_mask)) | ||
| 84 | return -EFAULT; | 86 | return -EFAULT; |
| 85 | __get_user(new_ka.sa.sa_flags, &act->sa_flags); | ||
| 86 | __get_user(mask, &act->sa_mask); | ||
| 87 | siginitset(&new_ka.sa.sa_mask, mask); | 87 | siginitset(&new_ka.sa.sa_mask, mask); |
| 88 | } | 88 | } |
| 89 | 89 | ||
| @@ -92,10 +92,10 @@ sys_sigaction(int sig, const struct old_sigaction __user *act, | |||
| 92 | if (!ret && oact) { | 92 | if (!ret && oact) { |
| 93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || | 93 | if (!access_ok(VERIFY_WRITE, oact, sizeof(*oact)) || |
| 94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || | 94 | __put_user(old_ka.sa.sa_handler, &oact->sa_handler) || |
| 95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer)) | 95 | __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer) || |
| 96 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags) || | ||
| 97 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask)) | ||
| 96 | return -EFAULT; | 98 | return -EFAULT; |
| 97 | __put_user(old_ka.sa.sa_flags, &oact->sa_flags); | ||
| 98 | __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask); | ||
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | return ret; | 101 | return ret; |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 66375a5e3d12..92ecffbc8d82 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
| @@ -462,7 +462,8 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
| 462 | local_irq_enable(); | 462 | local_irq_enable(); |
| 463 | 463 | ||
| 464 | if (regs->psw.mask & PSW_MASK_PSTATE) { | 464 | if (regs->psw.mask & PSW_MASK_PSTATE) { |
| 465 | get_user(*((__u16 *) opcode), (__u16 __user *) location); | 465 | if (get_user(*((__u16 *) opcode), (__u16 __user *) location)) |
| 466 | return; | ||
| 466 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { | 467 | if (*((__u16 *) opcode) == S390_BREAKPOINT_U16) { |
| 467 | if (current->ptrace & PT_PTRACED) | 468 | if (current->ptrace & PT_PTRACED) |
| 468 | force_sig(SIGTRAP, current); | 469 | force_sig(SIGTRAP, current); |
| @@ -470,20 +471,25 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
| 470 | signal = SIGILL; | 471 | signal = SIGILL; |
| 471 | #ifdef CONFIG_MATHEMU | 472 | #ifdef CONFIG_MATHEMU |
| 472 | } else if (opcode[0] == 0xb3) { | 473 | } else if (opcode[0] == 0xb3) { |
| 473 | get_user(*((__u16 *) (opcode+2)), location+1); | 474 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
| 475 | return; | ||
| 474 | signal = math_emu_b3(opcode, regs); | 476 | signal = math_emu_b3(opcode, regs); |
| 475 | } else if (opcode[0] == 0xed) { | 477 | } else if (opcode[0] == 0xed) { |
| 476 | get_user(*((__u32 *) (opcode+2)), | 478 | if (get_user(*((__u32 *) (opcode+2)), |
| 477 | (__u32 __user *)(location+1)); | 479 | (__u32 __user *)(location+1))) |
| 480 | return; | ||
| 478 | signal = math_emu_ed(opcode, regs); | 481 | signal = math_emu_ed(opcode, regs); |
| 479 | } else if (*((__u16 *) opcode) == 0xb299) { | 482 | } else if (*((__u16 *) opcode) == 0xb299) { |
| 480 | get_user(*((__u16 *) (opcode+2)), location+1); | 483 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
| 484 | return; | ||
| 481 | signal = math_emu_srnm(opcode, regs); | 485 | signal = math_emu_srnm(opcode, regs); |
| 482 | } else if (*((__u16 *) opcode) == 0xb29c) { | 486 | } else if (*((__u16 *) opcode) == 0xb29c) { |
| 483 | get_user(*((__u16 *) (opcode+2)), location+1); | 487 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
| 488 | return; | ||
| 484 | signal = math_emu_stfpc(opcode, regs); | 489 | signal = math_emu_stfpc(opcode, regs); |
| 485 | } else if (*((__u16 *) opcode) == 0xb29d) { | 490 | } else if (*((__u16 *) opcode) == 0xb29d) { |
| 486 | get_user(*((__u16 *) (opcode+2)), location+1); | 491 | if (get_user(*((__u16 *) (opcode+2)), location+1)) |
| 492 | return; | ||
| 487 | signal = math_emu_lfpc(opcode, regs); | 493 | signal = math_emu_lfpc(opcode, regs); |
| 488 | #endif | 494 | #endif |
| 489 | } else | 495 | } else |
diff --git a/arch/s390/kernel/vmlinux.lds.S b/arch/s390/kernel/vmlinux.lds.S index af9e69a03011..fe0f2e97ba7b 100644 --- a/arch/s390/kernel/vmlinux.lds.S +++ b/arch/s390/kernel/vmlinux.lds.S | |||
| @@ -83,13 +83,7 @@ SECTIONS | |||
| 83 | __setup_end = .; | 83 | __setup_end = .; |
| 84 | __initcall_start = .; | 84 | __initcall_start = .; |
| 85 | .initcall.init : { | 85 | .initcall.init : { |
| 86 | *(.initcall1.init) | 86 | INITCALLS |
| 87 | *(.initcall2.init) | ||
| 88 | *(.initcall3.init) | ||
| 89 | *(.initcall4.init) | ||
| 90 | *(.initcall5.init) | ||
| 91 | *(.initcall6.init) | ||
| 92 | *(.initcall7.init) | ||
| 93 | } | 87 | } |
| 94 | __initcall_end = .; | 88 | __initcall_end = .; |
| 95 | __con_initcall_start = .; | 89 | __con_initcall_start = .; |
