]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
locking/barriers: introduce new observable speculation barrier
authorElena Reshetova <elena.reshetova@intel.com>
Mon, 7 Aug 2017 08:03:42 +0000 (11:03 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 5 Feb 2018 15:55:56 +0000 (16:55 +0100)
commit845cf605b8c3c34e5988fd57eaa835de8886d26e
treeeea329908f689b7570fb0840aedc150c0f676ecc
parentfb03791e71086d81fd3adaa443bb7b5c1b52f3f6
locking/barriers: introduce new observable speculation barrier

CVE-2017-5753 (Spectre v1 Intel)

The new observable speculation barrier, osb(), ensures
that any user observable speculation doesn't cross the boundary.

Any user observable speculative activity on this CPU
thread before this point either completes, reaches a
state it can no longer cause an observable activity, or
is aborted before instructions after the barrier execute.

In x86 case, osb() resolves in lfence if X86_FEATURE_LFENCE_RDTSC
is present. Other architectures can define their variants.

Suggested-by: Arjan van de Ven <arjan@linux.intel.com>
Suggested-by: Alan Cox <alan.cox@intel.com>
Signed-off-by: Elena Reshetova <elena.reshetova@intel.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/x86/include/asm/barrier.h
include/asm-generic/barrier.h