]> git.baikalelectronics.ru Git - kernel.git/commit
s390: correct module section names for expoline code revert
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 20 Apr 2018 10:48:52 +0000 (12:48 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 23 Apr 2018 05:57:17 +0000 (07:57 +0200)
commit8d33dfdafac881749851dc2eab2d7bd4b445490b
tree78cac8001df28cbf073c3ca8cb6953a972b4ffea
parentba0f884a3fbfbd7a0ce2a954c68a98bdbdca646d
s390: correct module section names for expoline code revert

The main linker script vmlinux.lds.S for the kernel image merges
the expoline code patch tables into two section ".nospec_call_table"
and ".nospec_return_table". This is *not* done for the modules,
there the sections retain their original names as generated by gcc:
".s390_indirect_call", ".s390_return_mem" and ".s390_return_reg".

The module_finalize code has to check for the compiler generated
section names, otherwise no code patching is done. This slows down
the module code in case of "spectre_v2=off".

Cc: stable@vger.kernel.org # 4.16
Fixes: 495976bd9f ("s390: introduce execute-trampolines for branches")
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/module.c