summaryrefslogtreecommitdiffstats
path: root/arch/x86/include
diff options
context:
space:
mode:
authorJann Horn <jannh@google.com>2018-08-28 22:14:17 +0200
committerThomas Gleixner <tglx@linutronix.de>2018-09-03 15:12:08 +0200
commite3e4d5019c2dd0f91600f6df377b215a73d506fe (patch)
treee7fcc4c123d0b8879c18f092b9c833824a4d74c9 /arch/x86/include
parent76dee4a72849561f6ffacc357cfd0aa33336081a (diff)
downloadblackbird-obmc-linux-e3e4d5019c2dd0f91600f6df377b215a73d506fe.tar.gz
blackbird-obmc-linux-e3e4d5019c2dd0f91600f6df377b215a73d506fe.zip
x86/kprobes: Stop calling fixup_exception() from kprobe_fault_handler()
This removes the call into exception fixup that was added in commit c28f896634f2 ("[PATCH] kprobes: fix broken fault handling for x86_64"). On X86, kprobe_fault_handler() is called from two places: do_general_protection() (for #GP) and kprobes_fault() (for #PF). In both paths, the fixup_exception() call in the kprobe fault handler is redundant. In case of #GP, fixup_exception() is called immediately before kprobe_fault_handler() is invoked, so no need to try that again. This assumes that the kprobe's fault handler isn't going to do something crazy like changing RIP so that it suddenly points to an instruction that does userspace access. For #PF on a kernel address from kernel space, after the kprobe fault handler has run, no_context() is invoked, which calls fixup_exception(). Signed-off-by: Jann Horn <jannh@google.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Kees Cook <keescook@chromium.org> Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Andy Lutomirski <luto@kernel.org> Cc: kernel-hardening@lists.openwall.com Cc: linux-kernel@vger.kernel.org Cc: dvyukov@google.com Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com> Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com> Cc: "David S. Miller" <davem@davemloft.net> Cc: Alexander Viro <viro@zeniv.linux.org.uk> Cc: linux-fsdevel@vger.kernel.org Cc: Borislav Petkov <bp@alien8.de> Link: https://lkml.kernel.org/r/20180828201421.157735-4-jannh@google.com
Diffstat (limited to 'arch/x86/include')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud