diff options
author | David S. Miller <davem@davemloft.net> | 2011-08-20 19:39:12 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-08-20 19:39:12 +0200 |
commit | 823dcd2506fa369aeb8cbd26da5663efe2fda9a9 (patch) | |
tree | 853b3e3c05f0b9ee1b5df8464db19b7acc57150c /arch/x86/mm/fault.c | |
parent | tg3: Update version to 3.120 (diff) | |
parent | ipv6: Fix ipv6_getsockopt for IPV6_2292PKTOPTIONS (diff) | |
download | linux-823dcd2506fa369aeb8cbd26da5663efe2fda9a9.tar.xz linux-823dcd2506fa369aeb8cbd26da5663efe2fda9a9.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'arch/x86/mm/fault.c')
-rw-r--r-- | arch/x86/mm/fault.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c index 4d09df054e39..247aae3dc008 100644 --- a/arch/x86/mm/fault.c +++ b/arch/x86/mm/fault.c @@ -105,7 +105,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 +720,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); |