linux/arch/s390/kernel
Heiko Carstens a759972d25 KVM: s390: fix sthyi error handling
[ Upstream commit 0c02cc576e ]

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 12:08:11 +02:00
..
syscalls
vdso32
vdso64 s390/vdso: Drop '-shared' from KBUILD_CFLAGS_64 2023-03-10 09:33:41 +01:00
.gitignore
abs_lowcore.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
alternative.c
asm-offsets.c
audit.c
audit.h
cache.c
compat_audit.c
compat_linux.c
compat_linux.h
compat_ptrace.h
compat_signal.c
cpcmd.c
cpufeature.c s390/uvdevice: autoload module based on CPU facility 2022-07-19 16:18:49 +02:00
crash_dump.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
debug.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
diag.c
dis.c
dumpstack.c
early_printk.c
early.c s390/early: fix sclp_early_sccb variable lifetime 2023-03-10 09:32:53 +01:00
earlypgm.S
ebcdic.c
entry.h
entry.S
fpu.c
ftrace.c
ftrace.h
guarded_storage.c
head64.S s390/early: fix sclp_early_sccb variable lifetime 2023-03-10 09:32:53 +01:00
idle.c s390/idle: mark arch_cpu_idle() noinstr 2023-03-10 09:33:52 +01:00
ima_arch.c
ipl_vmparm.c
ipl.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
irq.c
jump_label.c
kdebugfs.c
kexec_elf.c
kexec_image.c
kprobes_insn_page.S
kprobes.c s390/kprobes: fix current_kprobe never cleared after kprobes reenter 2023-03-10 09:34:04 +01:00
lgr.c
machine_kexec_file.c s390/kexec: fix ipl report address for kdump 2023-01-18 11:58:11 +01:00
machine_kexec_reloc.c
machine_kexec.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
Makefile rethook, fprobe: do not trace rethook related functions 2023-05-24 17:32:53 +01:00
mcount.S
module.c
nmi.c s390/boot: fix absolute zero lowcore corruption on boot 2022-09-07 14:04:01 +02:00
nospec-branch.c
nospec-sysfs.c
numa.c
os_info.c s390/mm: uninline copy_oldmem_kernel() function 2022-09-14 16:46:01 +02:00
perf_cpum_cf_common.c
perf_cpum_cf_events.c
perf_cpum_cf.c perf: Use sample_flags for raw_data 2022-09-27 22:50:24 +02:00
perf_cpum_sf.c s390/cpum_sf: add READ_ONCE() semantics to compare and swap loops 2023-01-18 11:58:12 +01:00
perf_event.c
perf_pai_crypto.c perf: Use sample_flags for raw_data 2022-09-27 22:50:24 +02:00
perf_pai_ext.c s390/pai: fix raw data collection for PMU pai_ext 2022-10-26 14:47:31 +02:00
perf_regs.c
process.c treewide: use get_random_{u8,u16}() when possible, part 2 2022-10-11 17:42:58 -06:00
processor.c s390/cpufeature: rework to allow more than only hwcap bits 2022-07-19 16:18:49 +02:00
ptrace.c s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling 2023-04-26 14:28:36 +02:00
reipl.S
relocate_kernel.S
runtime_instr.c
setup.c s390: workaround invalid gcc-11 out of bounds read warning 2023-02-06 08:06:33 +01:00
signal.c
smp.c s390/mm: uninline copy_oldmem_kernel() function 2022-09-14 16:46:01 +02:00
stacktrace.c
sthyi.c KVM: s390: fix sthyi error handling 2023-08-11 12:08:11 +02:00
syscall.c
sysinfo.c
text_amode31.S
time.c
topology.c s390/topology: honour nr_cpu_ids when adding CPUs 2023-06-09 10:34:13 +02:00
trace.c
traps.c
unwind_bc.c
uprobes.c
uv.c KVM: s390: fix race in gmap_make_secure() 2023-05-17 11:53:38 +02:00
vdso.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
vmlinux.lds.S s390: discard .interp section 2023-03-10 09:34:04 +01:00
vtime.c