From 13820bcc3096eb21a6d4dfbdec8523c6e07b8715 Mon Sep 17 00:00:00 2001
From: Breno Leitao <brenohl@br.ibm.com>
Date: Wed, 10 Jan 2018 08:39:57 -0500
Subject: [PATCH 08/26] UBUNTU: SAUCE: powerpc/kernel: Does not use sync

CVE-2017-5754

Currently Ubuntu 14.04 does not have a binutils that understands hwsync.
This patch simply uses sync instruction instead of hwsync

Signed-off-by: Breno Leitao <brenohl@br.ibm.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
 arch/powerpc/kernel/exceptions-64s.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/exceptions-64s.S b/arch/powerpc/kernel/exceptions-64s.S
index 96cbba0..68717b6 100644
--- a/arch/powerpc/kernel/exceptions-64s.S
+++ b/arch/powerpc/kernel/exceptions-64s.S
@@ -676,7 +676,7 @@ rfi_flush_fallback:
 	DCBT_STOP_ALL_STREAM_IDS(r11) /* Stop prefetch streams */
 
 	/* order ld/st prior to dcbt stop all streams with flushing */
-	hwsync
+	sync
 1:	li	r8,0
 	.rept	8 /* 8-way set associative */
 	ldx	r11,r10,r8
@@ -719,7 +719,7 @@ hrfi_flush_fallback:
 	DCBT_STOP_ALL_STREAM_IDS(r11) /* Stop prefetch streams */
 
 	/* order ld/st prior to dcbt stop all streams with flushing */
-	hwsync
+	sync
 1:	li	r8,0
 	.rept	8 /* 8-way set associative */
 	ldx	r11,r10,r8
-- 
2.7.4

