diff options
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/compat_wrapper.S | 4 | ||||
-rw-r--r-- | arch/s390/kernel/ptrace.c | 7 | ||||
-rw-r--r-- | arch/s390/kernel/sys_s390.c | 9 |
4 files changed, 13 insertions, 9 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index d1225089a4bb..f606d935f495 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -620,7 +620,6 @@ asmlinkage unsigned long old32_mmap(struct mmap_arg_struct_emu31 __user *arg) | |||
620 | return -EFAULT; | 620 | return -EFAULT; |
621 | if (a.offset & ~PAGE_MASK) | 621 | if (a.offset & ~PAGE_MASK) |
622 | return -EINVAL; | 622 | return -EINVAL; |
623 | a.addr = (unsigned long) compat_ptr(a.addr); | ||
624 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, | 623 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, |
625 | a.offset >> PAGE_SHIFT); | 624 | a.offset >> PAGE_SHIFT); |
626 | } | 625 | } |
@@ -631,7 +630,6 @@ asmlinkage long sys32_mmap2(struct mmap_arg_struct_emu31 __user *arg) | |||
631 | 630 | ||
632 | if (copy_from_user(&a, arg, sizeof(a))) | 631 | if (copy_from_user(&a, arg, sizeof(a))) |
633 | return -EFAULT; | 632 | return -EFAULT; |
634 | a.addr = (unsigned long) compat_ptr(a.addr); | ||
635 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); | 633 | return sys_mmap_pgoff(a.addr, a.len, a.prot, a.flags, a.fd, a.offset); |
636 | } | 634 | } |
637 | 635 | ||
diff --git a/arch/s390/kernel/compat_wrapper.S b/arch/s390/kernel/compat_wrapper.S index e835d6d5b7fd..2d82cfcbce5b 100644 --- a/arch/s390/kernel/compat_wrapper.S +++ b/arch/s390/kernel/compat_wrapper.S | |||
@@ -1635,7 +1635,7 @@ ENTRY(compat_sys_process_vm_readv_wrapper) | |||
1635 | llgfr %r6,%r6 # unsigned long | 1635 | llgfr %r6,%r6 # unsigned long |
1636 | llgf %r0,164(%r15) # unsigned long | 1636 | llgf %r0,164(%r15) # unsigned long |
1637 | stg %r0,160(%r15) | 1637 | stg %r0,160(%r15) |
1638 | jg sys_process_vm_readv | 1638 | jg compat_sys_process_vm_readv |
1639 | 1639 | ||
1640 | ENTRY(compat_sys_process_vm_writev_wrapper) | 1640 | ENTRY(compat_sys_process_vm_writev_wrapper) |
1641 | lgfr %r2,%r2 # compat_pid_t | 1641 | lgfr %r2,%r2 # compat_pid_t |
@@ -1645,4 +1645,4 @@ ENTRY(compat_sys_process_vm_writev_wrapper) | |||
1645 | llgfr %r6,%r6 # unsigned long | 1645 | llgfr %r6,%r6 # unsigned long |
1646 | llgf %r0,164(%r15) # unsigned long | 1646 | llgf %r0,164(%r15) # unsigned long |
1647 | stg %r0,160(%r15) | 1647 | stg %r0,160(%r15) |
1648 | jg sys_process_vm_writev | 1648 | jg compat_sys_process_vm_writev |
diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index f4eb37680b91..e4be113fbac6 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c | |||
@@ -719,7 +719,11 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
719 | long ret = 0; | 719 | long ret = 0; |
720 | 720 | ||
721 | /* Do the secure computing check first. */ | 721 | /* Do the secure computing check first. */ |
722 | secure_computing_strict(regs->gprs[2]); | 722 | if (secure_computing(regs->gprs[2])) { |
723 | /* seccomp failures shouldn't expose any additional code. */ | ||
724 | ret = -1; | ||
725 | goto out; | ||
726 | } | ||
723 | 727 | ||
724 | /* | 728 | /* |
725 | * The sysc_tracesys code in entry.S stored the system | 729 | * The sysc_tracesys code in entry.S stored the system |
@@ -745,6 +749,7 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) | |||
745 | regs->gprs[2], regs->orig_gpr2, | 749 | regs->gprs[2], regs->orig_gpr2, |
746 | regs->gprs[3], regs->gprs[4], | 750 | regs->gprs[3], regs->gprs[4], |
747 | regs->gprs[5]); | 751 | regs->gprs[5]); |
752 | out: | ||
748 | return ret ?: regs->gprs[2]; | 753 | return ret ?: regs->gprs[2]; |
749 | } | 754 | } |
750 | 755 | ||
diff --git a/arch/s390/kernel/sys_s390.c b/arch/s390/kernel/sys_s390.c index b4a29eee41b8..d0964d22adb5 100644 --- a/arch/s390/kernel/sys_s390.c +++ b/arch/s390/kernel/sys_s390.c | |||
@@ -81,11 +81,12 @@ SYSCALL_DEFINE1(s390_personality, unsigned int, personality) | |||
81 | { | 81 | { |
82 | unsigned int ret; | 82 | unsigned int ret; |
83 | 83 | ||
84 | if (current->personality == PER_LINUX32 && personality == PER_LINUX) | 84 | if (personality(current->personality) == PER_LINUX32 && |
85 | personality = PER_LINUX32; | 85 | personality(personality) == PER_LINUX) |
86 | personality |= PER_LINUX32; | ||
86 | ret = sys_personality(personality); | 87 | ret = sys_personality(personality); |
87 | if (ret == PER_LINUX32) | 88 | if (personality(ret) == PER_LINUX32) |
88 | ret = PER_LINUX; | 89 | ret &= ~PER_LINUX32; |
89 | 90 | ||
90 | return ret; | 91 | return ret; |
91 | } | 92 | } |