mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 19:00:25 +00:00
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>
This commit is contained in:
parent
6dd85fbb87
commit
467a3bf219
2 changed files with 7 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
|
#include <asm/nospec-insn.h>
|
||||||
#include <asm/vx-insn.h>
|
#include <asm/vx-insn.h>
|
||||||
|
|
||||||
/* Vector register range containing CRC-32 constants */
|
/* Vector register range containing CRC-32 constants */
|
||||||
|
@ -67,6 +68,8 @@
|
||||||
|
|
||||||
.previous
|
.previous
|
||||||
|
|
||||||
|
GEN_BR_THUNK %r14
|
||||||
|
|
||||||
.text
|
.text
|
||||||
/*
|
/*
|
||||||
* The CRC-32 function(s) use these calling conventions:
|
* The CRC-32 function(s) use these calling conventions:
|
||||||
|
@ -203,6 +206,6 @@ ENTRY(crc32_be_vgfm_16)
|
||||||
|
|
||||||
.Ldone:
|
.Ldone:
|
||||||
VLGVF %r2,%v2,3
|
VLGVF %r2,%v2,3
|
||||||
br %r14
|
BR_EX %r14
|
||||||
|
|
||||||
.previous
|
.previous
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
|
#include <asm/nospec-insn.h>
|
||||||
#include <asm/vx-insn.h>
|
#include <asm/vx-insn.h>
|
||||||
|
|
||||||
/* Vector register range containing CRC-32 constants */
|
/* Vector register range containing CRC-32 constants */
|
||||||
|
@ -76,6 +77,7 @@
|
||||||
|
|
||||||
.previous
|
.previous
|
||||||
|
|
||||||
|
GEN_BR_THUNK %r14
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
|
@ -264,6 +266,6 @@ crc32_le_vgfm_generic:
|
||||||
|
|
||||||
.Ldone:
|
.Ldone:
|
||||||
VLGVF %r2,%v2,2
|
VLGVF %r2,%v2,2
|
||||||
br %r14
|
BR_EX %r14
|
||||||
|
|
||||||
.previous
|
.previous
|
||||||
|
|
Loading…
Reference in a new issue