1 From foo@baz Wed May 23 19:38:57 CEST 2018
2 From: Martin Schwidefsky <schwidefsky@de.ibm.com>
3 Date: Wed, 23 May 2018 18:22:03 +0200
4 Subject: s390/crc32-vx: use expoline for indirect branches
5 To: stable@vger.kernel.org
6 Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
7 Message-ID: <1527092529-24383-4-git-send-email-schwidefsky@de.ibm.com>
9 From: Martin Schwidefsky <schwidefsky@de.ibm.com>
11 [ Upstream commit 467a3bf219cee12259182c5cb4821f88fd518a51 ]
13 The return from the crc32_le_vgfm_16/crc32c_le_vgfm_16 and the
14 crc32_be_vgfm_16 functions are done with "br %r14". These are indirect
15 branches as well and need to use execute trampolines for CONFIG_EXPOLINE=y.
17 Cc: stable@vger.kernel.org # 4.16
18 Fixes: f19fbd5ed6 ("s390: introduce execute-trampolines for branches")
19 Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
20 Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
21 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23 arch/s390/crypto/crc32be-vx.S | 5 ++++-
24 arch/s390/crypto/crc32le-vx.S | 4 +++-
25 2 files changed, 7 insertions(+), 2 deletions(-)
27 --- a/arch/s390/crypto/crc32be-vx.S
28 +++ b/arch/s390/crypto/crc32be-vx.S
32 #include <linux/linkage.h>
33 +#include <asm/nospec-insn.h>
34 #include <asm/vx-insn.h>
36 /* Vector register range containing CRC-32 constants */
45 * The CRC-32 function(s) use these calling conventions:
46 @@ -203,6 +206,6 @@ ENTRY(crc32_be_vgfm_16)
54 --- a/arch/s390/crypto/crc32le-vx.S
55 +++ b/arch/s390/crypto/crc32le-vx.S
59 #include <linux/linkage.h>
60 +#include <asm/nospec-insn.h>
61 #include <asm/vx-insn.h>
63 /* Vector register range containing CRC-32 constants */
72 @@ -264,6 +266,6 @@ crc32_le_vgfm_generic: