]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/mm: Only set IBPB when the new thread cannot ptrace current thread
authorKonrad Rzeszutek Wilk <konrad@kernel.org>
Thu, 4 Jan 2018 16:30:05 +0000 (11:30 -0500)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:19:56 +0000 (10:19 -0800)
commit7dab39dd39e716c5777d28710e0d1ddded6f25fd
tree9a09b9043cf3e794fa02f0a39bce98b5ab170cac
parentf0c867593ede55a01346013ddfd941ad2035d0e7
x86/mm: Only set IBPB when the new thread cannot ptrace current thread

To reduce overhead of setting IBPB, we only do that when
the new thread cannot ptrace the current one.  If the new
thread has ptrace capability on current thread, it is safe.

Orabug: 27344012
CVE: CVE-2017-5715

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[Backport: Need more #include's than the original]

Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/include/asm/mmu_context.h
include/linux/ptrace.h
kernel/ptrace.c