[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <7121fe11b8ecbc0dd041819d8d331324df58c0e0.1520965380.git.msuchanek@suse.de>
Date: Tue, 13 Mar 2018 19:33:01 +0100
From: Michal Suchanek <msuchanek@...e.de>
To: linuxppc-dev@...ts.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
Michael Ellerman <mpe@...erman.id.au>,
Peter Zijlstra <peterz@...radead.org>,
Michal Suchanek <msuchanek@...e.de>,
Kate Stewart <kstewart@...uxfoundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Philippe Ombredanne <pombredanne@...b.com>,
Nicholas Piggin <npiggin@...il.com>,
"Tobin C. Harding" <me@...in.cc>,
Mahesh Salgaonkar <mahesh@...ux.vnet.ibm.com>,
David Gibson <david@...son.dropbear.id.au>,
Al Viro <viro@...iv.linux.org.uk>,
Michael Neuling <mikey@...ling.org>,
"Oliver O'Halloran" <oohall@...il.com>,
"Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>,
Madhavan Srinivasan <maddy@...ux.vnet.ibm.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Balbir Singh <bsingharora@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Christophe Leroy <christophe.leroy@....fr>,
Andrew Donnellan <andrew.donnellan@....ibm.com>,
Daniel Axtens <dja@...ens.net>,
Russell Currey <ruscur@...sell.cc>,
Joe Perches <joe@...ches.com>,
"Bryant G. Ly" <bryantly@...ux.vnet.ibm.com>,
Cédric Le Goater <clg@...d.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH RFC 3/8] powerpc/64: Use barrier_nospec in syscall entry
Signed-off-by: Michal Suchanek <msuchanek@...e.de>
---
arch/powerpc/kernel/entry_64.S | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
index 2cb5109a7ea3..7bfc4cf48af2 100644
--- a/arch/powerpc/kernel/entry_64.S
+++ b/arch/powerpc/kernel/entry_64.S
@@ -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() */
--
2.13.6
Powered by blists - more mailing lists