]> www.infradead.org Git - users/jedix/linux-maple.git/commit
locking/barriers: introduce new observable speculation barrier
authorElena Reshetova <elena.reshetova@intel.com>
Thu, 4 Jan 2018 07:56:24 +0000 (23:56 -0800)
committerKirtikar Kashyap <kirtikar.kashyap@oracle.com>
Fri, 12 Jan 2018 18:19:59 +0000 (10:19 -0800)
commit99ee27dc0c92b950dbf5dd1ac1c8e8f3647a8e1a
treebb56a2ea7d841e33f1492895d30bdb4632957837
parent4b6bd1eda6a0bff919a31e12d8c24f1641bd8ef9
locking/barriers: introduce new observable speculation barrier

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>
Orabug: 27340445
CVE: CVE-2017-5753

Signed-off-by: Chuck Anderson <chuck.anderson@oracle.com>
Conflicts:
include/asm-generic/barrier.h code base differences

Reviewed-by: John Haxby <john.haxby@oracle.com>
Signed-off-by: Kirtikar Kashyap <kirtikar.kashyap@oracle.com>
arch/x86/include/asm/barrier.h
include/asm-generic/barrier.h