Commit ee71154e authored by Balbir Singh's avatar Balbir Singh Committed by Marcelo Henrique Cerri

UBUNTU: SAUCE: rfi-flush: Add barriers to the fallback L1D flushing

CVE-2017-5754

BugLink: http://bugs.launchpad.net/bugs/1742772

Add a hwsync after DCBT_STOP_ALL_STREAM_IDS to order loads/
stores prior to stopping prefetch with loads and stores
as a part of the flushing. A lwsync is needed to ensure
that after we don't mix the flushing of one congruence class
with another
Signed-off-by: default avatarBalbir Singh <bsingharora@gmail.com>
Signed-off-by: default avatarMarcelo Henrique Cerri <marcelo.cerri@canonical.com>
parent cab09201
......@@ -741,13 +741,15 @@ rfi_flush_fallback:
addi r12,r12,8
mtctr r11
DCBT_STOP_ALL_STREAM_IDS(r11) /* Stop prefetch streams */
/* XXX: Should an instruction synchronizing operation be done here? */
/* order ld/st prior to dcbt stop all streams with flushing */
hwsync
1: li r8,0
.rept 8 /* 8-way set associative */
ldx r11,r10,r8
add r8,r8,r12
.endr
lwsync /* Ensure that we do all 8 sets before others */
addi r10,r10,128 /* 128 byte cache line */
bdnz 1b
......@@ -781,13 +783,15 @@ hrfi_flush_fallback:
addi r12,r12,8
mtctr r11
DCBT_STOP_ALL_STREAM_IDS(r11) /* Stop prefetch streams */
/* XXX: Should an instruction synchronizing operation be done here? */
/* order ld/st prior to dcbt stop all streams with flushing */
hwsync
1: li r8,0
.rept 8 /* 8-way set associative */
ldx r11,r10,r8
add r8,r8,r12
.endr
lwsync /* Ensure that we do all 8 sets before others */
addi r10,r10,128 /* 128 byte cache line */
bdnz 1b
......
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