summaryrefslogtreecommitdiffstats
path: root/arch/s390/crypto/crc32be-vx.S
diff options
context:
space:
mode:
authorMartin Schwidefsky <schwidefsky@de.ibm.com>2018-04-23 14:31:36 +0200
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-05-07 09:07:34 +0200
commit467a3bf219cee12259182c5cb4821f88fd518a51 (patch)
tree3a2f3f860f899d8b1c2cc58fb3e4f5825cd7d03e /arch/s390/crypto/crc32be-vx.S
parents390: move expoline assembler macros to a header (diff)
downloadlinux-467a3bf219cee12259182c5cb4821f88fd518a51.tar.xz
linux-467a3bf219cee12259182c5cb4821f88fd518a51.zip
s390/crc32-vx: use expoline for indirect branches
The return from the crc32_le_vgfm_16/crc32c_le_vgfm_16 and the crc32_be_vgfm_16 functions are done with "br %r14". These are indirect branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y. Cc: stable@vger.kernel.org # 4.16 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches") Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/crypto/crc32be-vx.S')
-rw-r--r--arch/s390/crypto/crc32be-vx.S5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/s390/crypto/crc32be-vx.S b/arch/s390/crypto/crc32be-vx.S
index e8077f0971f8..2bf01ba44107 100644
--- a/arch/s390/crypto/crc32be-vx.S
+++ b/arch/s390/crypto/crc32be-vx.S
@@ -13,6 +13,7 @@
*/
#include <linux/linkage.h>
+#include <asm/nospec-insn.h>
#include <asm/vx-insn.h>
/* Vector register range containing CRC-32 constants */
@@ -67,6 +68,8 @@
.previous
+ GEN_BR_THUNK %r14
+
.text
/*
* The CRC-32 function(s) use these calling conventions:
@@ -203,6 +206,6 @@ ENTRY(crc32_be_vgfm_16)
.Ldone:
VLGVF %r2,%v2,3
- br %r14
+ BR_EX %r14
.previous