From: tip-bot for Dmitry Safonov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: dsafonov@virtuozzo.com, mpatocka@redhat.com, xemul@virtuozzo.com,
gorcunov@openvz.org, hpa@zytor.com, mingo@kernel.org,
tglx@linutronix.de, 0x7f454c46@gmail.com, oleg@redhat.com,
linux-kernel@vger.kernel.org, kilobyte@angband.pl
Subject: [tip:x86/urgent] x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi()
Date: Thu, 20 Oct 2016 02:21:52 -0700 [thread overview]
Message-ID: <tip-3b68db0c1f80c763213f07db60b4feda186345f5@git.kernel.org> (raw)
In-Reply-To: <CAJwJo6Z8ZWPqNfT6t-i8GW1MKxQrKDUagQqnZ+0+697=MyVeGg@mail.gmail.com>
Commit-ID: 3b68db0c1f80c763213f07db60b4feda186345f5
Gitweb: http://git.kernel.org/tip/3b68db0c1f80c763213f07db60b4feda186345f5
Author: Dmitry Safonov <0x7f454c46@gmail.com>
AuthorDate: Thu, 20 Oct 2016 00:53:08 +0300
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Thu, 20 Oct 2016 11:17:12 +0200
x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi()
The recent introduction of SA_X32/IA32 sa_flags added a check for
user_64bit_mode() into sigaction_compat_abi(). user_64bit_mode() is true
for native 64bit processes and x32 processes.
Due to that the function returns w/o setting the SA_X32_ABI flag for X32
processes. In consequence the kernel attempts to deliver the signal to the
X32 process in native 64bit mode causing the process to segfault.
Remove the check, so the actual check for X32 mode which sets the ABI flag
can be reached. There is no side effect for native 64bit mode.
[ tglx: Rewrote changelog ]
Fixes: 6846351052e6 ("x86/signal: Add SA_{X32,IA32}_ABI sa_flags")
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Adam Borowski <kilobyte@angband.pl>
Signed-off-by: Dmitry Safonov <0x7f454c46@gmail.com>
Cc: Dmitry Safonov <dsafonov@virtuozzo.com>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: linux-mm@kvack.org
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Pavel Emelyanov <xemul@virtuozzo.com>
Link: http://lkml.kernel.org/r/CAJwJo6Z8ZWPqNfT6t-i8GW1MKxQrKDUagQqnZ%2B0%2B697%3DMyVeGg@mail.gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/signal_compat.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/arch/x86/kernel/signal_compat.c b/arch/x86/kernel/signal_compat.c
index 40df337..ec1f756 100644
--- a/arch/x86/kernel/signal_compat.c
+++ b/arch/x86/kernel/signal_compat.c
@@ -105,9 +105,6 @@ void sigaction_compat_abi(struct k_sigaction *act, struct k_sigaction *oact)
/* Don't let flags to be set from userspace */
act->sa.sa_flags &= ~(SA_IA32_ABI | SA_X32_ABI);
- if (user_64bit_mode(current_pt_regs()))
- return;
-
if (in_ia32_syscall())
act->sa.sa_flags |= SA_IA32_ABI;
if (in_x32_syscall())
next prev parent reply other threads:[~2016-10-20 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-19 17:19 x32 is broken in 4.9-rc1 due to "x86/signal: Add SA_{X32,IA32}_ABI sa_flags" Mikulas Patocka
2016-10-19 17:19 ` Mikulas Patocka
2016-10-19 17:33 ` Mikulas Patocka
2016-10-19 17:33 ` Mikulas Patocka
2016-10-19 17:45 ` Dmitry Safonov
2016-10-19 17:45 ` Dmitry Safonov
2016-10-19 22:02 ` Dmitry Safonov
2016-10-20 3:13 ` Adam Borowski
2016-10-20 3:13 ` Adam Borowski
2016-10-20 9:21 ` tip-bot for Dmitry Safonov [this message]
2016-10-20 9:24 ` Thomas Gleixner
2016-10-20 9:24 ` Thomas Gleixner
2016-10-20 11:00 ` Dmitry Safonov
2016-10-20 11:00 ` Dmitry Safonov
2016-10-20 15:22 ` Mikulas Patocka
2016-10-20 15:22 ` Mikulas Patocka
2016-10-21 5:49 ` [tip:x86/urgent] x86/signal: Remove bogus user_64bit_mode() check from sigaction_compat_abi() tip-bot for Dmitry Safonov
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-3b68db0c1f80c763213f07db60b4feda186345f5@git.kernel.org \
--to=tipbot@zytor.com \
--cc=0x7f454c46@gmail.com \
--cc=dsafonov@virtuozzo.com \
--cc=gorcunov@openvz.org \
--cc=hpa@zytor.com \
--cc=kilobyte@angband.pl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mpatocka@redhat.com \
--cc=oleg@redhat.com \
--cc=tglx@linutronix.de \
--cc=xemul@virtuozzo.com \
/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.