android_kernel_motorola_sm6225/arch/s390/kernel
Heiko Carstens 33e8990666 KVM: s390: fix sthyi error handling
[ Upstream commit 0c02cc576eac161601927b41634f80bfd55bfa9e ]

Commit 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
added cache handling for store hypervisor info. This also changed the
possible return code for sthyi_fill().

Instead of only returning a condition code like the sthyi instruction would
do, it can now also return a negative error value (-ENOMEM). handle_styhi()
was not changed accordingly. In case of an error, the negative error value
would incorrectly injected into the guest PSW.

Add proper error handling to prevent this, and update the comment which
describes the possible return values of sthyi_fill().

Fixes: 9fb6c9b3fe ("s390/sthyi: add cache to store hypervisor info")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Link: https://lore.kernel.org/r/20230727182939.2050744-1-hca@linux.ibm.com
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:37 +02:00
..
syscalls kbuild: do not redirect the first prerequisite for filechk 2018-07-28 10:34:10 +09:00
vdso32 s390/kasan: avoid vdso instrumentation 2019-11-24 08:20:43 +01:00
vdso64 s390/vdso: fix vDSO clock_getres() 2020-06-30 23:17:14 -04:00
.gitignore
alternative.c s390: add automatic detection of the spectre defense 2018-03-28 08:38:24 +02:00
asm-offsets.c s390/vdso: fix vDSO clock_getres() 2020-06-30 23:17:14 -04:00
audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
audit.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
base.S s390/kernel: use expoline for indirect branches 2018-05-07 21:12:39 +02:00
cache.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_audit.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_linux.c mm: add ksys_readahead() helper; remove in-kernel calls to sys_readahead() 2018-04-02 20:16:12 +02:00
compat_linux.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_ptrace.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
compat_signal.c s390/compat: fix setup_frame32 2018-04-10 07:38:54 +02:00
compat_wrapper.c s390: wire up rseq system call 2018-07-04 08:35:18 +02:00
cpcmd.c s390/cpcmd: fix inline assembly register clobbering 2021-04-14 08:22:35 +02:00
crash_dump.c s390/crashdump: fix TOD programmable field size 2022-12-08 11:18:30 +01:00
debug.c s390/debug: avoid kernel warning on too large number of pages 2020-07-09 09:37:09 +02:00
diag.c s390/ftrace: fix potential crashes when switching tracers 2020-05-10 10:30:09 +02:00
dis.c s390/disassembler: increase ebpf disasm buffer size 2021-05-22 10:59:12 +02:00
dumpstack.c exit: Add and use make_task_dead. 2023-02-06 07:49:45 +01:00
early.c s390/kasan: fix early pgm check handler execution 2020-07-16 08:17:22 +02:00
early_nobss.c s390/early: move functions which may not access bss section to extra file 2018-05-09 10:55:01 +02:00
early_printk.c s390/hibernate: fix error handling when suspend cpu != resume cpu 2018-09-20 13:20:23 +02:00
ebcdic.c s390: ebcdic: convert comments to UTF-8 2018-08-23 18:48:43 -07:00
entry.h s390/boot: make head.S and als.c be part of the decompressor only 2018-06-25 10:14:38 +02:00
entry.S s390/entry: save the caller of psw_idle 2021-04-28 13:16:52 +02:00
fpu.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ftrace.c s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 11:13:49 +02:00
guarded_storage.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
head64.S s390: correct _stext offset 2018-07-02 11:24:59 +02:00
idle.c s390/idle: fix cpu idle time calculation 2019-11-06 13:06:20 +01:00
ipl.c s390/ipl: remove reipl_method and dump_method 2018-04-10 07:39:00 +02:00
irq.c s390: remove indirect branch from do_softirq_own_stack 2018-05-07 21:12:42 +02:00
jump_label.c s390/jump_label: print real address in a case of a jump label bug 2021-09-22 11:48:04 +02:00
kdebugfs.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
kexec_elf.c s390/kexec_file: Fix potential segment overlap in ELF loader 2020-01-27 14:50:42 +01:00
kexec_image.c s390/kexec_file: Add crash support to image loader 2018-04-16 09:10:22 +02:00
kprobes.c s390/kprobes: fix current_kprobe never cleared after kprobes reenter 2023-03-11 16:31:49 +01:00
lgr.c s390: kernel: add SPDX identifiers to the remaining files 2017-11-24 15:37:12 +01:00
machine_kexec.c s390/ipl: correct kdump reipl block checksum calculation 2018-04-10 07:39:00 +02:00
machine_kexec_file.c s390/kexec_file: Add ELF loader 2018-04-16 09:10:23 +02:00
Makefile s390/kasan: avoid instrumentation of early C code 2019-11-24 08:20:44 +01:00
mcount.S s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 11:13:49 +02:00
module.c treewide: Use array_size() in vmalloc() 2018-06-12 16:19:22 -07:00
nmi.c exit: Add and use make_task_dead. 2023-02-06 07:49:45 +01:00
nospec-branch.c s390/speculation: Support 'mitigations=' cmdline option 2019-05-14 19:17:59 +02:00
nospec-sysfs.c s390: detect etoken facility 2018-07-18 08:32:17 +02:00
os_info.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf_cpum_cf.c s390/cpum_cf: Reject request for sampling in event initialization 2018-12-17 09:24:32 +01:00
perf_cpum_cf_events.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
perf_cpum_sf.c s390/cpum_sf.c: fix file permission for cpum_sfb_size 2020-11-24 13:27:26 +01:00
perf_event.c s390: kernel: Remove redundant license text 2017-11-24 15:37:20 +01:00
perf_regs.c s390/perf: fix gcc 8 array-bounds warning 2018-07-02 11:24:54 +02:00
pgm_check.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
process.c s390: fix double free of GS and RI CBs on fork() failure 2022-09-05 10:26:32 +02:00
processor.c s390/cpuinfo: fix wrong output when CPU0 is offline 2020-04-23 10:30:18 +02:00
ptrace.c s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling 2023-04-26 11:21:51 +02:00
reipl.S s390/kernel: use expoline for indirect branches 2018-05-07 21:12:39 +02:00
relocate_kernel.S s390: assume diag308 set always works 2018-04-10 07:38:59 +02:00
runtime_instr.c s390/runtime_instrumentation: fix storage key handling 2020-08-26 10:31:03 +02:00
setup.c s390/setup: init jump labels before command line parsing 2023-03-11 16:32:02 +01:00
signal.c s390: wire up rseq system call 2018-07-04 08:35:18 +02:00
smp.c treewide: Remove uninitialized_var() usage 2023-08-11 11:45:01 +02:00
stacktrace.c s390: kernel: add SPDX identifiers to the remaining files 2017-11-24 15:37:12 +01:00
sthyi.c KVM: s390: fix sthyi error handling 2023-08-11 11:45:37 +02:00
suspend.c s390: unify linker symbols usage 2018-02-27 08:05:23 +01:00
swsusp.S s390/hibernate: fix error handling when suspend cpu != resume cpu 2018-09-20 13:20:23 +02:00
sys_s390.c mm: add ksys_mmap_pgoff() helper; remove in-kernel calls to sys_mmap_pgoff() 2018-04-02 20:16:11 +02:00
sysinfo.c s390/sysinfo: add missing #ifdef CONFIG_PROC_FS 2018-07-02 12:32:20 +02:00
time.c s390/stp: add locking to sysfs functions 2020-11-05 11:08:51 +01:00
topology.c s390/topology: avoid firing events before kobjs are created 2019-10-11 18:20:42 +02:00
trace.c s390/ftrace: fix potential crashes when switching tracers 2020-05-10 10:30:09 +02:00
traps.c signal/s390: Use force_sig_fault where appropriate 2018-04-25 10:44:08 -05:00
uprobes.c s390/uprobes: implement arch_uretprobe_is_alive() 2018-04-23 07:57:16 +02:00
vdso.c s390/vdso: correct vdso mapping for compat tasks 2019-11-20 18:47:53 +01:00
vmlinux.lds.S s390: discard .interp section 2023-03-11 16:31:48 +01:00
vtime.c s390: kernel: add SPDX identifiers to the remaining files 2017-11-24 15:37:12 +01:00