diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-08-26 12:58:41 -0400 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-08-26 12:58:41 -0400 |
commit | c78aa4c4b94b5b148be576a9f1570e31fe282b46 (patch) | |
tree | 6d5801eb3e60bcec6a91c7b13a334c6d2ea11b05 /arch/s390 | |
parent | 90993cdd1800dc6ef9587431a0c625b978584e81 (diff) | |
parent | 9acb172543aecb783e2e1e53e3f447d4c0f5c150 (diff) |
Merge remote-tracking branch 'upstream/master' into queue
Merging critical fixes from upstream required for development.
* upstream/master: (809 commits)
libata: Add a space to " 2GB ATA Flash Disk" DMA blacklist entry
Revert "powerpc: Update g5_defconfig"
powerpc/perf: Use pmc_overflow() to detect rolled back events
powerpc: Fix VMX in interrupt check in POWER7 copy loops
powerpc: POWER7 copy_to_user/copy_from_user patch applied twice
powerpc: Fix personality handling in ppc64_personality()
powerpc/dma-iommu: Fix IOMMU window check
powerpc: Remove unnecessary ifdefs
powerpc/kgdb: Restore current_thread_info properly
powerpc/kgdb: Bail out of KGDB when we've been triggered
powerpc/kgdb: Do not set kgdb_single_step on ppc
powerpc/mpic_msgr: Add missing includes
powerpc: Fix null pointer deref in perf hardware breakpoints
powerpc: Fixup whitespace in xmon
powerpc: Fix xmon dl command for new printk implementation
xfs: check for possible overflow in xfs_ioc_trim
xfs: unlock the AGI buffer when looping in xfs_dialloc
xfs: fix uninitialised variable in xfs_rtbuf_get()
powerpc/fsl: fix "Failed to mount /dev: No such device" errors
powerpc/fsl: update defconfigs
...
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/Kconfig | 1 | ||||
-rw-r--r-- | arch/s390/include/asm/sparsemem.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/syscall.h | 10 | ||||
-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 |
7 files changed, 24 insertions, 11 deletions
diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig index 76de6b68487c..107610e01a29 100644 --- a/arch/s390/Kconfig +++ b/arch/s390/Kconfig | |||
@@ -124,6 +124,7 @@ config S390 | |||
124 | select GENERIC_TIME_VSYSCALL | 124 | select GENERIC_TIME_VSYSCALL |
125 | select GENERIC_CLOCKEVENTS | 125 | select GENERIC_CLOCKEVENTS |
126 | select KTIME_SCALAR if 32BIT | 126 | select KTIME_SCALAR if 32BIT |
127 | select HAVE_ARCH_SECCOMP_FILTER | ||
127 | 128 | ||
128 | config SCHED_OMIT_FRAME_POINTER | 129 | config SCHED_OMIT_FRAME_POINTER |
129 | def_bool y | 130 | def_bool y |
diff --git a/arch/s390/include/asm/sparsemem.h b/arch/s390/include/asm/sparsemem.h index 0fb34027d3f6..a60d085ddb4d 100644 --- a/arch/s390/include/asm/sparsemem.h +++ b/arch/s390/include/asm/sparsemem.h | |||
@@ -4,13 +4,11 @@ | |||
4 | #ifdef CONFIG_64BIT | 4 | #ifdef CONFIG_64BIT |
5 | 5 | ||
6 | #define SECTION_SIZE_BITS 28 | 6 | #define SECTION_SIZE_BITS 28 |
7 | #define MAX_PHYSADDR_BITS 46 | ||
8 | #define MAX_PHYSMEM_BITS 46 | 7 | #define MAX_PHYSMEM_BITS 46 |
9 | 8 | ||
10 | #else | 9 | #else |
11 | 10 | ||
12 | #define SECTION_SIZE_BITS 25 | 11 | #define SECTION_SIZE_BITS 25 |
13 | #define MAX_PHYSADDR_BITS 31 | ||
14 | #define MAX_PHYSMEM_BITS 31 | 12 | #define MAX_PHYSMEM_BITS 31 |
15 | 13 | ||
16 | #endif /* CONFIG_64BIT */ | 14 | #endif /* CONFIG_64BIT */ |
diff --git a/arch/s390/include/asm/syscall.h b/arch/s390/include/asm/syscall.h index fb214dd9b7e0..fe7b99759e12 100644 --- a/arch/s390/include/asm/syscall.h +++ b/arch/s390/include/asm/syscall.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #ifndef _ASM_SYSCALL_H | 12 | #ifndef _ASM_SYSCALL_H |
13 | #define _ASM_SYSCALL_H 1 | 13 | #define _ASM_SYSCALL_H 1 |
14 | 14 | ||
15 | #include <linux/audit.h> | ||
15 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
17 | #include <asm/ptrace.h> | 18 | #include <asm/ptrace.h> |
@@ -87,4 +88,13 @@ static inline void syscall_set_arguments(struct task_struct *task, | |||
87 | regs->orig_gpr2 = args[0]; | 88 | regs->orig_gpr2 = args[0]; |
88 | } | 89 | } |
89 | 90 | ||
91 | static inline int syscall_get_arch(struct task_struct *task, | ||
92 | struct pt_regs *regs) | ||
93 | { | ||
94 | #ifdef CONFIG_COMPAT | ||
95 | if (test_tsk_thread_flag(task, TIF_31BIT)) | ||
96 | return AUDIT_ARCH_S390; | ||
97 | #endif | ||
98 | return sizeof(long) == 8 ? AUDIT_ARCH_S390X : AUDIT_ARCH_S390; | ||
99 | } | ||
90 | #endif /* _ASM_SYSCALL_H */ | 100 | #endif /* _ASM_SYSCALL_H */ |
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 | } |