Commit 087580bf authored by Martin Schwidefsky's avatar Martin Schwidefsky Committed by Marcelo Henrique Cerri

s390/spinlock: add gmb memory barrier

CVE-2017-5753
CVE-2017-5715
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>
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
parent b6ea5c00
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
#ifndef __ASM_BARRIER_H #ifndef __ASM_BARRIER_H
#define __ASM_BARRIER_H #define __ASM_BARRIER_H
#include <asm/alternative.h>
/* /*
* Force strict CPU ordering. * Force strict CPU ordering.
* And yes, this is required on UP too when we're talking * And yes, this is required on UP too when we're talking
...@@ -22,6 +24,14 @@ ...@@ -22,6 +24,14 @@
#define mb() do { asm volatile(__ASM_BARRIER : : : "memory"); } while (0) #define mb() do { asm volatile(__ASM_BARRIER : : : "memory"); } while (0)
static inline void gmb(void)
{
asm volatile(
ALTERNATIVE("", ".long 0xb2e8f000", 81)
: : : "memory");
}
#define gmb gmb
#define rmb() barrier() #define rmb() barrier()
#define wmb() barrier() #define wmb() barrier()
#define dma_rmb() mb() #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