diff options
author | Joerg Roedel <jroedel@suse.de> | 2017-04-04 12:15:01 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-04-21 03:31:20 -0400 |
commit | 59bf2308895337fdf70b3a183e7f3c8723030982 (patch) | |
tree | 47c2f15379c7a82277a04b1cec95af0c836c0f4e | |
parent | 41d8b02f6448af73203720c5ecf52eab798b1a40 (diff) |
x86/signals: Fix lower/upper bound reporting in compat siginfo
commit cfac6dfa42bddfa9711b20d486e521d1a41ab09f upstream.
Put the right values from the original siginfo into the
userspace compat-siginfo.
This fixes the 32-bit MPX "tabletest" testcase on 64-bit kernels.
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Borislav Petkov <bp@suse.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: a4455082dc6f0 ('x86/signals: Add missing signal_compat code for x86 features')
Link: http://lkml.kernel.org/r/1491322501-5054-1-git-send-email-joro@8bytes.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/kernel/signal_compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c index ec1f756f9dc9..71beb28600d4 100644 --- a/arch/x86/kernel/signal_compat.c +++ b/arch/x86/kernel/signal_compat.c | |||
@@ -151,8 +151,8 @@ int __copy_siginfo_to_user32(compat_siginfo_t __user *to, const siginfo_t *from, | |||
151 | 151 | ||
152 | if (from->si_signo == SIGSEGV) { | 152 | if (from->si_signo == SIGSEGV) { |
153 | if (from->si_code == SEGV_BNDERR) { | 153 | if (from->si_code == SEGV_BNDERR) { |
154 | compat_uptr_t lower = (unsigned long)&to->si_lower; | 154 | compat_uptr_t lower = (unsigned long)from->si_lower; |
155 | compat_uptr_t upper = (unsigned long)&to->si_upper; | 155 | compat_uptr_t upper = (unsigned long)from->si_upper; |
156 | put_user_ex(lower, &to->si_lower); | 156 | put_user_ex(lower, &to->si_lower); |
157 | put_user_ex(upper, &to->si_upper); | 157 | put_user_ex(upper, &to->si_upper); |
158 | } | 158 | } |