diff options
| author | Ingo Molnar <mingo@elte.hu> | 2011-08-18 21:56:42 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2011-08-18 21:56:47 +0200 |
| commit | 8bc84f87315e8bdbe242ba788fdc6a74d653b177 (patch) | |
| tree | b96fef5c82de40cb2a5bfe6f29699f1c820513cd /arch/x86/mm/fault.c | |
| parent | 18e5a45db30e0e338cdd663eda05a8288cc14fa5 (diff) | |
| parent | fe4c51b22080691792d3e28d86acb4d4ccb7e8e8 (diff) | |
| download | talos-op-linux-8bc84f87315e8bdbe242ba788fdc6a74d653b177.tar.gz talos-op-linux-8bc84f87315e8bdbe242ba788fdc6a74d653b177.zip | |
Merge branch 'perf/urgent' into perf/core
Merge reason: add the latest fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/mm/fault.c')
| -rw-r--r-- | arch/x86/mm/fault.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 4d09df054e39..0d17c8c50acd 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -17,6 +17,7 @@ #include <asm/traps.h> /* dotraplinkage, ... */ #include <asm/pgalloc.h> /* pgd_*(), ... */ #include <asm/kmemcheck.h> /* kmemcheck_*(), ... */ +#include <asm/vsyscall.h> /* * Page fault error code bits: @@ -105,7 +106,7 @@ check_prefetch_opcode(struct pt_regs *regs, unsigned char *instr, * but for now it's good enough to assume that long * mode only uses well known segments or kernel. */ - return (!user_mode(regs)) || (regs->cs == __USER_CS); + return (!user_mode(regs) || user_64bit_mode(regs)); #endif case 0x60: /* 0x64 thru 0x67 are valid prefixes in all modes. */ @@ -720,6 +721,18 @@ __bad_area_nosemaphore(struct pt_regs *regs, unsigned long error_code, if (is_errata100(regs, address)) return; +#ifdef CONFIG_X86_64 + /* + * Instruction fetch faults in the vsyscall page might need + * emulation. + */ + if (unlikely((error_code & PF_INSTR) && + ((address & ~0xfff) == VSYSCALL_START))) { + if (emulate_vsyscall(regs, address)) + return; + } +#endif + if (unlikely(show_unhandled_signals)) show_signal_msg(regs, error_code, address, tsk); |

