Commit 2fc7fab6 authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Kleber Sacilotto de Souza

UBUNTU: SAUCE: s390/spinlock: add osb memory barrier

CVE-2017-5753 (Spectre v1 Intel)
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarKleber Sacilotto de Souza <kleber.souza@canonical.com>
parent c5a6edd4
......@@ -7,6 +7,8 @@
#ifndef __ASM_BARRIER_H
#define __ASM_BARRIER_H
#include <asm/alternative.h>
/*
* Force strict CPU ordering.
* And yes, this is required on UP too when we're talking
......@@ -22,6 +24,14 @@
#define mb() do { asm volatile(__ASM_BARRIER : : : "memory"); } while (0)
static inline void osb(void)
{
asm volatile(
ALTERNATIVE("", ".long 0xb2e8f000", 81)
: : : "memory");
}
#define osb osb
#define rmb() barrier()
#define wmb() barrier()
#define dma_rmb() mb()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment