android_kernel_samsung_univ.../drivers/s390/char
Martin Schwidefsky d6e925eca0 s390: introduce execute-trampolines for branches
[ Upstream commit f19fbd5ed642dc31c809596412dab1ed56f2f156 ]

Add CONFIG_EXPOLINE to enable the use of the new -mindirect-branch= and
-mfunction_return= compiler options to create a kernel fortified against
the specte v2 attack.

With CONFIG_EXPOLINE=y all indirect branches will be issued with an
execute type instruction. For z10 or newer the EXRL instruction will
be used, for older machines the EX instruction. The typical indirect
call

	basr	%r14,%r1

is replaced with a PC relative call to a new thunk

	brasl	%r14,__s390x_indirect_jump_r1

The thunk contains the EXRL/EX instruction to the indirect branch

__s390x_indirect_jump_r1:
	exrl	0,0f
	j	.
0:	br	%r1

The detour via the execute type instruction has a performance impact.
To get rid of the detour the new kernel parameter "nospectre_v2" and
"spectre_v2=[on,off,auto]" can be used. If the parameter is specified
the kernel and module code will be patched at runtime.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-29 07:50:03 +02:00
..
con3215.c
con3270.c
ctrlchar.c
ctrlchar.h s390/ctrlchar: improve handling of magic sysrequests 2015-08-26 17:20:44 +02:00
defkeymap.c
defkeymap.map
diag_ftp.c
diag_ftp.h
fs3270.c s390/3270: fix missing device_destroy() call 2013-11-15 14:08:37 +01:00
hmcdrv_cache.c
hmcdrv_cache.h
hmcdrv_dev.c
hmcdrv_dev.h
hmcdrv_ftp.c s390/hmcdrv: free memory on error path 2015-01-22 12:16:11 +01:00
hmcdrv_ftp.h
hmcdrv_mod.c
Kconfig
keyboard.c s390/keyboard: avoid off-by-one when using strnlen_user() 2015-06-15 10:51:12 +02:00
keyboard.h
Makefile
monreader.c s390/iucv: do not use arrays as argument 2015-09-21 16:03:04 -07:00
monwriter.c
raw3270.c
raw3270.h
sclp_async.c s390/sclp_async: add Kconfig option to specify the component id 2014-11-28 09:45:11 +01:00
sclp_cmd.c
sclp_con.c
sclp_config.c s390/sclp: reword cpu capability change message 2013-08-22 12:20:07 +02:00
sclp_cpi_sys.c
sclp_cpi_sys.h
sclp_cpi.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
sclp_ctl.c s390/sclp_ctl: fix potential information leak with /dev/sclp 2016-09-15 08:27:51 +02:00
sclp_diag.h s390/hmcdrv: HMC drive CD/DVD access 2014-09-25 10:52:02 +02:00
sclp_early.c
sclp_ftp.c
sclp_ftp.h
sclp_ocf.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
sclp_quiesce.c
sclp_rw.c s390/sclp: avoid merged message output 2015-10-14 14:32:10 +02:00
sclp_rw.h
sclp_sdias.c
sclp_sdias.h s390/sclp: Move declarations for sclp_sdias into separate header file 2013-11-15 14:08:39 +01:00
sclp_tty.c
sclp_tty.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
sclp_vt220.c
sclp.c
sclp.h s390/sclp: move sclp_facilities into "struct sclp" 2015-05-13 09:58:18 +02:00
tape_34xx.c s390/tape: remove redundant if statement 2015-01-22 12:51:49 +01:00
tape_3590.c
tape_3590.h
tape_char.c
tape_class.c
tape_class.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
tape_core.c
tape_proc.c
tape_std.c
tape_std.h
tape.h
tty3270.c
tty3270.h
vmcp.c
vmcp.h
vmlogrdr.c
vmur.c s390/vmur: Link parent CCW device during UR device creation 2014-01-22 14:02:11 +01:00
vmur.h [S390] vmur: Use wait queue instead of mutex to serialize open 2008-04-17 07:46:59 +02:00
zcore.c