diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-07 00:30:42 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2022-03-10 17:58:17 +0300 |
commit | 602bf1687e6f475de2fe29bb1ed81d03bdc06b6d (patch) | |
tree | 6e72a541e0525fef8c00abe63329964307dddd58 /arch/s390/include/asm/nospec-insn.h | |
parent | 1d2ad084800edad81cdc955304272742b10721c7 (diff) | |
download | linux-602bf1687e6f475de2fe29bb1ed81d03bdc06b6d.tar.xz |
s390/nospec: align and size extern thunks
Kernel has full control over how extern thunks generated by
arch/s390/lib/expoline.S look like. Align them to 16 bytes like other
symbols. Also set proper symbols size which is important for tooling.
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/include/asm/nospec-insn.h')
-rw-r--r-- | arch/s390/include/asm/nospec-insn.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/s390/include/asm/nospec-insn.h b/arch/s390/include/asm/nospec-insn.h index bbb5c4d84db9..c670c1dd1293 100644 --- a/arch/s390/include/asm/nospec-insn.h +++ b/arch/s390/include/asm/nospec-insn.h @@ -20,6 +20,7 @@ _LC_BR_R1 = __LC_BR_R1 .macro __THUNK_PROLOG_NAME name #ifdef CONFIG_EXPOLINE_EXTERN .pushsection .text,"ax",@progbits + .align 16,0x07 #else .pushsection .text.\name,"axG",@progbits,\name,comdat #endif @@ -30,8 +31,11 @@ _LC_BR_R1 = __LC_BR_R1 CFI_STARTPROC .endm - .macro __THUNK_EPILOG + .macro __THUNK_EPILOG_NAME name CFI_ENDPROC +#ifdef CONFIG_EXPOLINE_EXTERN + .size \name, .-\name +#endif .popsection .endm @@ -40,6 +44,10 @@ _LC_BR_R1 = __LC_BR_R1 __THUNK_PROLOG_NAME __s390_indirect_jump_r\r1 .endm + .macro __THUNK_EPILOG_BR r1,r2 + __THUNK_EPILOG_NAME __s390_indirect_jump_r\r1 + .endm + .macro __THUNK_BR r1,r2 jg __s390_indirect_jump_r\r1 .endm @@ -52,6 +60,10 @@ _LC_BR_R1 = __LC_BR_R1 __THUNK_PROLOG_NAME __s390_indirect_jump_r\r2\()use_r\r1 .endm + .macro __THUNK_EPILOG_BR r1,r2 + __THUNK_EPILOG_NAME __s390_indirect_jump_r\r2\()use_r\r1 + .endm + .macro __THUNK_BR r1,r2 jg __s390_indirect_jump_r\r2\()use_r\r1 .endm @@ -128,7 +140,7 @@ _LC_BR_R1 = __LC_BR_R1 #endif __DECODE_RR __THUNK_PROLOG_BR,\reg,\ruse __THUNK_EX_BR \reg,\ruse - __THUNK_EPILOG + __DECODE_RR __THUNK_EPILOG_BR,\reg,\ruse .endm .macro BR_EX reg,ruse=%r1 |