Commit f424765a authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Zefan Li

x86/asm/entry/32: Fix user_mode() misuses

commit 394838c9 upstream.

The one in do_debug() is probably harmless, but better safe than sorry.
Signed-off-by: default avatarAndy 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.netSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
[lizf: Backported to 3.4: drop the change to do_bounds()]
Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
parent 04fd2763
...@@ -435,7 +435,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code) ...@@ -435,7 +435,7 @@ dotraplinkage void __kprobes do_debug(struct pt_regs *regs, long error_code)
* then it's very likely the result of an icebp/int01 trap. * then it's very likely the result of an icebp/int01 trap.
* User wants a sigtrap for that. * User wants a sigtrap for that.
*/ */
if (!dr6 && user_mode(regs)) if (!dr6 && user_mode_vm(regs))
user_icebp = 1; user_icebp = 1;
/* Catch kmemcheck conditions first of all! */ /* Catch kmemcheck conditions first of all! */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment