acrn-kernel/arch/s390/kernel
Heiko Carstens f44e07a8af s390/crashdump: fix TOD programmable field size
The size of the TOD programmable field was incorrectly increased from
four to eight bytes with commit 1a2c5840ac ("s390/dump: cleanup CPU
save area handling").
This leads to an elf notes section NT_S390_TODPREG which has a size of
eight instead of four bytes in case of kdump, however even worse is
that the contents is incorrect: it is supposed to contain only the
contents of the TOD programmable field, but in fact contains a mix of
the TOD programmable field (32 bit upper bits) and parts of the CPU
timer register (lower 32 bits).

Fix this by simply changing the size of the todpreg field within the
save area structure. This will implicitly also fix the size of the
corresponding elf notes sections.

This also gets rid of this compile time warning:

in function ‘fortify_memcpy_chk’,
    inlined from ‘save_area_add_regs’ at arch/s390/kernel/crash_dump.c:99:2:
./include/linux/fortify-string.h:413:25: error: call to ‘__read_overflow2_field’
   declared with attribute warning: detected read beyond size of field
   (2nd parameter); maybe use struct_group()? [-Werror=attribute-warning]
  413 |                         __read_overflow2_field(q_size_field, size);
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 1a2c5840ac ("s390/dump: cleanup CPU save area handling")
Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
2022-11-24 13:45:05 +01:00
..
syscalls arch: syscalls: simplify uapi/kapi directory creation 2022-03-31 12:03:46 +09:00
vdso32
vdso64
.gitignore
Makefile Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
abs_lowcore.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
alternative.c s390/alternatives: remove padding generation code 2022-05-17 15:16:28 +02:00
asm-offsets.c s390/stack: add union to reflect kvm stack slot usages 2022-06-01 12:03:17 +02:00
audit.c
audit.h
cache.c
compat_audit.c
compat_linux.c
compat_linux.h s390/compat: cleanup compat_linux.h header file 2022-05-06 20:45:16 +02:00
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 s390/crashdump: fix TOD programmable field size 2022-11-24 13:45:05 +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.c s390: move from strlcpy with unused retval to strscpy 2022-08-30 22:00:33 +02:00
early_printk.c
earlypgm.S s390: generate register offsets into pt_regs automatically 2022-05-25 11:46:02 +02:00
ebcdic.c
entry.S s390/mcck: isolate SIE instruction when setting CIF_MCCK_GUEST flag 2022-06-01 12:03:16 +02:00
entry.h s390: simplify early program check handler 2022-05-25 11:46:02 +02:00
fpu.c
ftrace.c ftrace: Remove return value of ftrace_arch_modify_*() 2022-05-26 21:13:00 -04:00
ftrace.h
guarded_storage.c
head64.S
idle.c
ima_arch.c
ipl.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
ipl_vmparm.c
irq.c s390/irq: utilize RCU instead of irq_lock_sparse() in show_msi_interrupt() 2022-04-27 12:53:34 +02:00
jump_label.c jump_label: make initial NOP patching the special case 2022-06-24 09:48:55 +02:00
kdebugfs.c
kexec_elf.c
kexec_image.c
kprobes.c s390/kprobes: enable kretprobes framepointer verification 2022-03-27 22:18:39 +02:00
kprobes_insn_page.S
lgr.c
machine_kexec.c s390/smp: rework absolute lowcore access 2022-09-14 16:46:00 +02:00
machine_kexec_file.c kexec, KEYS, s390: Make use of built-in and secondary keyring for signature verification 2022-07-15 12:21:16 -04:00
machine_kexec_reloc.c
mcount.S
module.c jump_label: mips: move module NOP patching into arch code 2022-06-24 09:48:55 +02:00
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.c perf: Use sample_flags for raw_data 2022-09-27 22:50:24 +02:00
perf_cpum_cf_common.c
perf_cpum_cf_events.c s390/cpumf: add new extended counter set for IBM z16 2022-05-16 10:58:33 +02:00
perf_cpum_sf.c
perf_event.c s390/stack: add union to reflect kvm stack slot usages 2022-06-01 12:03:17 +02:00
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 ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
reipl.S
relocate_kernel.S s390/kexec: set end-of-ipl flag in last diag308 call 2022-04-25 13:54:12 +02:00
runtime_instr.c
setup.c s390/mm: rework memcpy_real() to avoid DAT-off mode 2022-09-14 16:46:01 +02:00
signal.c ptrace: Cleanups for v5.18 2022-03-28 17:29:53 -07:00
smp.c s390/mm: uninline copy_oldmem_kernel() function 2022-09-14 16:46:01 +02:00
stacktrace.c
sthyi.c
syscall.c
sysinfo.c
text_amode31.S
time.c s390/stp: clock_delta should be signed 2022-05-11 14:40:57 +02:00
topology.c
trace.c
traps.c
unwind_bc.c s390/unwind: avoid duplicated unwinding entries for kretprobes 2022-03-27 22:18:39 +02:00
uprobes.c
uv.c KVM: s390: pv: add export before import 2022-07-13 14:42:11 +00:00
vdso.c treewide: use prandom_u32_max() when possible, part 1 2022-10-11 17:42:55 -06:00
vmlinux.lds.S s390: fix nospec table alignments 2022-08-30 21:57:07 +02:00
vtime.c