android_kernel_sony_sdm845/arch/s390/kernel
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Heiko Carstens d67a9fba12 s390/crashdump: fix TOD programmable field size
[ Upstream commit f44e07a8afdd713ddc1a8832c39372fe5dd86895 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:15:40 +01:00
..
vdso32 s390/kasan: avoid vdso instrumentation 2019-11-25 09:53:43 +01:00
vdso64 s390/kasan: avoid vdso instrumentation 2019-11-25 09:53:43 +01:00
.gitignore
als.c s390/als: print missing facilities on facility mismatch 2016-07-31 05:27:59 -04:00
alternative.c s390: add automatic detection of the spectre defense 2018-04-29 11:31:59 +02:00
asm-offsets.c s390/ftrace: use expoline for indirect branches 2018-05-25 16:12:57 +02:00
audit.c
audit.h
base.S s390/kernel: use expoline for indirect branches 2018-05-25 16:12:57 +02:00
cache.c s390/cpuinfo: show dynamic and static cpu mhz 2016-06-13 15:58:17 +02:00
compat_audit.c
compat_linux.c s390: fix handling of -1 in set{,fs}[gu]id16 syscalls 2018-02-22 15:43:52 +01:00
compat_linux.h
compat_ptrace.h
compat_signal.c s390/compat: correct restore of high gprs on signal return 2016-02-22 09:29:35 +01:00
compat_wrapper.c s390: wire up copy_file_range syscall 2016-01-19 12:14:02 +01:00
cpcmd.c s390/cpcmd: fix inline assembly register clobbering 2021-04-16 11:59:08 +02:00
crash_dump.c s390/crashdump: fix TOD programmable field size 2022-12-08 11:15:40 +01:00
debug.c s390: Use pr_warn instead of pr_warning 2016-03-07 13:12:04 +01:00
diag.c s390/diag: fix display of diagnose call statistics 2020-04-24 07:58:59 +02:00
dis.c s390/disassembler: correct disassembly lines alignment 2021-09-22 11:42:57 +02:00
dumpstack.c s390/dumpstack: use pr_cont within show_stack and die 2016-10-24 10:26:14 +02:00
early.c s390/kasan: fix early pgm check handler execution 2020-07-22 09:10:44 +02:00
ebcdic.c
entry.h s390/als: convert architecture level set code to C 2016-07-31 05:27:58 -04:00
entry.S s390/entry: save the caller of psw_idle 2021-04-28 12:07:17 +02:00
fpu.c s390/fpu: improve kernel_fpu_[begin|end] 2016-08-29 11:05:01 +02:00
ftrace.c s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 09:14:28 +02:00
head.S s390: clarify compressed image code path 2016-08-08 15:41:31 +02:00
head64.S s390/cpumf: Fix lpp detection 2016-03-08 10:38:06 +01:00
head_kdump.S
idle.c
ipl.c s390: add options to change branch prediction behaviour for the kernel 2018-04-29 11:31:59 +02:00
irq.c s390: remove indirect branch from do_softirq_own_stack 2018-05-22 16:57:57 +02:00
jump_label.c s390/jump_label: print real address in a case of a jump label bug 2021-09-22 11:43:06 +02:00
kprobes.c s390: migrate exception table users off module.h and onto extable.h 2016-09-20 14:26:38 +02:00
lgr.c
machine_kexec.c s390/kexec: fix crash on resize of reserved memory 2016-06-13 15:58:19 +02:00
Makefile s390: move spectre sysfs attribute code 2018-05-25 16:12:58 +02:00
mcount.S s390/ftrace: fix ftrace_update_ftrace_func implementation 2021-07-28 09:14:28 +02:00
module.c s390: correct module section names for expoline code revert 2018-04-29 11:32:00 +02:00
nmi.c s390/nmi: improve revalidation of fpu / vector registers 2016-08-29 11:05:03 +02:00
nospec-branch.c s390: extend expoline to BC instructions 2018-05-25 16:12:58 +02:00
nospec-sysfs.c s390: move spectre sysfs attribute code 2018-05-25 16:12:58 +02:00
os_info.c s390/dump: streamline oldmem copy functions 2015-11-27 09:24:12 +01:00
perf_cpum_cf.c s390/cpum_cf: Reject request for sampling in event initialization 2018-12-17 09:38:32 +01:00
perf_cpum_cf_events.c
perf_cpum_sf.c s390/cpum_sf.c: fix file permission for cpum_sfb_size 2020-11-24 13:03:10 +01:00
perf_event.c s390/dumpstack: restore reliable indicator for call traces 2016-10-17 14:44:30 +02:00
pgm_check.S
process.c s390/runtime instrumentation: simplify task exit handling 2017-12-09 22:01:47 +01:00
processor.c s390/cpuinfo: fix wrong output when CPU0 is offline 2020-04-24 07:59:12 +02:00
ptrace.c s390/ptrace: fix setting syscall number 2020-06-30 15:38:43 -04:00
reipl.S s390/kernel: use expoline for indirect branches 2018-05-25 16:12:57 +02:00
relocate_kernel.S
runtime_instr.c s390/runtime instrumentation: simplify task exit handling 2017-12-09 22:01:47 +01:00
sclp.c s390/sclp: move uninitialized data to data section 2016-07-31 05:27:58 -04:00
setup.c s390/setup: avoid using memblock_enforce_memory_limit 2021-12-08 08:45:05 +01:00
signal.c s390: remove all usages of PSW_ADDR_AMODE 2016-01-19 12:14:02 +01:00
smp.c s390/smp: __smp_rescan_cpus() - move cpumask away from stack 2021-03-17 16:10:14 +01:00
stacktrace.c s390/dumpstack: restore reliable indicator for call traces 2016-10-17 14:44:30 +02:00
suspend.c
swsusp.S s390/kernel: use expoline for indirect branches 2018-05-25 16:12:57 +02:00
sys_s390.c
syscalls.S s390: fix compat system call table 2017-12-14 09:28:13 +01:00
sysinfo.c s390/fpu: improve kernel_fpu_[begin|end] 2016-08-29 11:05:01 +02:00
time.c s390/time: avoid races when updating tb_update_count 2016-08-29 11:04:58 +02:00
topology.c s390/topology: avoid firing events before kobjs are created 2019-10-17 13:42:02 -07:00
trace.c s390/diag: avoid lockdep recursion 2016-02-11 13:05:56 +01:00
traps.c s390: migrate exception table users off module.h and onto extable.h 2016-09-20 14:26:38 +02:00
uprobes.c s390/uprobes: implement arch_uretprobe_is_alive() 2018-04-29 11:32:03 +02:00
vdso.c vdso: make arch_setup_additional_pages wait for mmap_sem for write killable 2016-05-23 17:04:14 -07:00
vmlinux.lds.S s390: fix nospec table alignments 2022-09-15 12:39:45 +02:00
vtime.c s390: add missing declarations 2016-05-10 13:24:51 +02:00