@@ -36,6 +36,7 @@
#include <asm/context_tracking.h>
#include <asm/tm.h>
#include <asm/ppc-opcode.h>
+#include <asm/barrier.h>
#include <asm/export.h>
#ifdef CONFIG_PPC_BOOK3S
#include <asm/exception-64s.h>
@@ -159,6 +160,7 @@ system_call: /* label this so stack traces look sane */
andi. r11,r10,_TIF_SYSCALL_DOTRACE
bne .Lsyscall_dotrace /* does not return */
cmpldi 0,r0,NR_syscalls
+ barrier_nospec
bge- .Lsyscall_enosys
.Lsyscall:
@@ -319,6 +321,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_HAS_PPR)
ld r10,TI_FLAGS(r10)
cmpldi r0,NR_syscalls
+ barrier_nospec
blt+ .Lsyscall
/* Return code is already in r3 thanks to do_syscall_trace_enter() */
Signed-off-by: Michal Suchanek <msuchanek@suse.de> --- arch/powerpc/kernel/entry_64.S | 3 +++ 1 file changed, 3 insertions(+)