projects
/
linux-dmdedup.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
427c08d
)
x86/asm/entry/32: Fix user_mode() misuses
author
Andy Lutomirski
<luto@amacapital.net>
Tue, 10 Mar 2015 00:42:31 +0000
(17:42 -0700)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Thu, 26 Mar 2015 12:59:48 +0000
(13:59 +0100)
commit
394838c96013ba414a24ffe7a2a593a9154daadf
upstream.
The one in do_debug() is probably harmless, but better safe than sorry.
Signed-off-by: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link:
http://lkml.kernel.org/r/d67deaa9df5458363623001f252d1aee3215d014.1425948056.git.luto@amacapital.net
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/traps.c
patch
|
blob
|
history
diff --git
a/arch/x86/kernel/traps.c
b/arch/x86/kernel/traps.c
index 88900e288021f23a2f22aebf739e25070f456971..89f4e64c2ceaef5f58e0f7d6f0f6fc0142aaf6c5 100644
(file)
--- a/
arch/x86/kernel/traps.c
+++ b/
arch/x86/kernel/traps.c
@@
-300,7
+300,7
@@
dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
goto exit;
conditional_sti(regs);
- if (!user_mode(regs))
+ if (!user_mode
_vm
(regs))
die("bounds", regs, error_code);
if (!cpu_feature_enabled(X86_FEATURE_MPX)) {
@@
-566,7
+566,7
@@
dotraplinkage void do_debug(struct pt_regs *regs, long error_code)
* then it's very likely the result of an icebp/int01 trap.
* User wants a sigtrap for that.
*/
- if (!dr6 && user_mode(regs))
+ if (!dr6 && user_mode
_vm
(regs))
user_icebp = 1;
/* Catch kmemcheck conditions first of all! */