[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-ae60f0710ae6b33092267ef8ac853c498f6d3e5d@git.kernel.org>
Date: Mon, 23 Mar 2015 05:27:10 -0700
From: tip-bot for Andy Lutomirski <tipbot@...or.com>
To: linux-tip-commits@...r.kernel.org
Cc: bp@...en8.de, tglx@...utronix.de, spender@...ecurity.net,
luto@...nel.org, dvlasenk@...hat.com, hpa@...or.com,
torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
mingo@...nel.org
Subject: [tip:x86/asm] x86/asm/entry: Use user_mode_ignore_vm86()
where appropriate
Commit-ID: ae60f0710ae6b33092267ef8ac853c498f6d3e5d
Gitweb: http://git.kernel.org/tip/ae60f0710ae6b33092267ef8ac853c498f6d3e5d
Author: Andy Lutomirski <luto@...nel.org>
AuthorDate: Wed, 18 Mar 2015 18:33:31 -0700
Committer: Ingo Molnar <mingo@...nel.org>
CommitDate: Mon, 23 Mar 2015 11:13:46 +0100
x86/asm/entry: Use user_mode_ignore_vm86() where appropriate
A few of the user_mode() checks in traps.c are immediately after
explicit checks for vm86 mode. Change them to user_mode_ignore_vm86().
Signed-off-by: Andy Lutomirski <luto@...nel.org>
Cc: Borislav Petkov <bp@...en8.de>
Cc: Brad Spengler <spender@...ecurity.net>
Cc: Denys Vlasenko <dvlasenk@...hat.com>
Cc: H. Peter Anvin <hpa@...or.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Link: http://lkml.kernel.org/r/0b324d5b75c3402be07f8d3c6245ed7f4995029e.1426728647.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
arch/x86/kernel/traps.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index 2773411..1136961 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -208,7 +208,7 @@ do_trap_no_signal(struct task_struct *tsk, int trapnr, char *str,
return -1;
}
#endif
- if (!user_mode(regs)) {
+ if (!user_mode_ignore_vm86(regs)) {
if (!fixup_exception(regs)) {
tsk->thread.error_code = error_code;
tsk->thread.trap_nr = trapnr;
@@ -471,7 +471,7 @@ do_general_protection(struct pt_regs *regs, long error_code)
#endif
tsk = current;
- if (!user_mode(regs)) {
+ if (!user_mode_ignore_vm86(regs)) {
if (fixup_exception(regs))
goto exit;
@@ -688,7 +688,7 @@ dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
* We already checked v86 mode above, so we can check for kernel mode
* by just checking the CPL of CS.
*/
- if ((dr6 & DR_STEP) && !user_mode(regs)) {
+ if ((dr6 & DR_STEP) && !user_mode_ignore_vm86(regs)) {
tsk->thread.debugreg6 &= ~DR_STEP;
set_tsk_thread_flag(tsk, TIF_SINGLESTEP);
regs->flags &= ~X86_EFLAGS_TF;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists