All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Joerg Roedel <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: luto@kernel.org, jroedel@suse.de, linux-kernel@vger.kernel.org,
	brgerst@gmail.com, 0x7f454c46@gmail.com, peterz@infradead.org,
	bp@alien8.de, bp@suse.de, hpa@zytor.com, dvlasenk@redhat.com,
	tglx@linutronix.de, dave.hansen@linux.intel.com,
	jpoimboe@redhat.com, mingo@kernel.org,
	torvalds@linux-foundation.org
Subject: [tip:x86/urgent] x86/signals: Fix lower/upper bound reporting in compat siginfo
Date: Wed, 5 Apr 2017 01:58:21 -0700	[thread overview]
Message-ID: <tip-cfac6dfa42bddfa9711b20d486e521d1a41ab09f@git.kernel.org> (raw)
In-Reply-To: <1491322501-5054-1-git-send-email-joro@8bytes.org>

Commit-ID:  cfac6dfa42bddfa9711b20d486e521d1a41ab09f
Gitweb:     http://git.kernel.org/tip/cfac6dfa42bddfa9711b20d486e521d1a41ab09f
Author:     Joerg Roedel <jroedel@suse.de>
AuthorDate: Tue, 4 Apr 2017 18:15:01 +0200
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 5 Apr 2017 10:16:43 +0200

x86/signals: Fix lower/upper bound reporting in compat siginfo

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: <stable@vger.kernel.org> # v4.8+
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>
---
 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);
 					}

      parent reply	other threads:[~2017-04-05  9:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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-bot for Joerg Roedel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-cfac6dfa42bddfa9711b20d486e521d1a41ab09f@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=0x7f454c46@gmail.com \
    --cc=bp@alien8.de \
    --cc=bp@suse.de \
    --cc=brgerst@gmail.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=jroedel@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.