]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
x86/mm: Only set IBPB when the new thread cannot ptrace current thread
authorTim Chen <tim.c.chen@linux.intel.com>
Tue, 7 Nov 2017 21:52:42 +0000 (13:52 -0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 16 Feb 2018 17:42:45 +0000 (12:42 -0500)
commit96d520d0fd4994643216f30fe91eea770ba934bc
tree6dd32d85fceeca3abd5b59bdd6d4ea40a70f1635
parent7d3dbf8e55857f6f03b62e6bd809e675a02f309a
x86/mm: Only set IBPB when the new thread cannot ptrace current thread

CVE-2017-5715 (Spectre v2 Intel)

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.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/mm/tlb.c
include/linux/ptrace.h
kernel/ptrace.c