public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/signals: Fix lower/upper bound reporting in compat siginfo
@ 2017-04-04 16:15 Joerg Roedel
  2017-04-04 16:56 ` Dave Hansen
  2017-04-05  8:58 ` [tip:x86/urgent] " tip-bot for Joerg Roedel
  0 siblings, 2 replies; 5+ messages in thread
From: Joerg Roedel @ 2017-04-04 16:15 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin
  Cc: x86, Dmitry Safonov, Dave Hansen, Joerg Roedel, linux-kernel,
	Borislav Petkov

From: Joerg Roedel <jroedel@suse.de>

Put the right values from the original siginfo into the
userspace compat-siginfo.

This fixes the 32-bit mpx tabletest on a 64-bit kernel.

Fixes: a4455082dc6f0 ('x86/signals: Add missing signal_compat code for x86 features')
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
---
 arch/x86/kernel/signal_compat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
index ec1f756..71beb28 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,
 
 				if (from->si_signo == SIGSEGV) {
 					if (from->si_code == SEGV_BNDERR) {
-						compat_uptr_t lower = (unsigned long)&to->si_lower;
-						compat_uptr_t upper = (unsigned long)&to->si_upper;
+						compat_uptr_t lower = (unsigned long)from->si_lower;
+						compat_uptr_t upper = (unsigned long)from->si_upper;
 						put_user_ex(lower, &to->si_lower);
 						put_user_ex(upper, &to->si_upper);
 					}
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-04-05 22:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-04 16:15 [PATCH] x86/signals: Fix lower/upper bound reporting in compat siginfo Joerg Roedel
2017-04-04 16:56 ` Dave Hansen
2017-04-04 21:53   ` Joerg Roedel
2017-04-05 22:45     ` Dave Hansen
2017-04-05  8:58 ` [tip:x86/urgent] " tip-bot for Joerg Roedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox