android_kernel_xiaomi_sm8450/arch
Heiko Carstens 1d840c5d67 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-02 17:40:02 +01:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:19:28 +02:00
arc arc: iounmap() arg is volatile 2022-11-03 23:57:51 +09:00
arm ARM: dts: imx6q-prti6q: Fix ref/tcxo-clock-frequency properties 2022-12-02 17:40:00 +01:00
arm64 arm64/syscall: Include asm/ptrace.h in syscall_wrapper header. 2022-12-02 17:39:58 +01:00
c6x arch-cleanup-2020-10-22 2020-10-23 10:06:38 -07:00
csky csky/kprobe: reclaim insn_slot on kprobe unregistration 2022-08-25 11:38:16 +02:00
h8300 h8300: fix PREEMPTION build, TI_PRE_COUNT undefined 2021-02-17 11:02:28 +01:00
hexagon hexagon: select ARCH_WANT_LD_ORPHAN_WARN 2022-08-21 15:15:33 +02:00
ia64 ia64: export memory_add_physaddr_to_nid to fix cxl build error 2022-10-26 13:25:29 +02:00
m68k Revert "m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch" 2022-07-29 17:19:09 +02:00
microblaze uaccess: fix nios2 and microblaze get_user_8() 2022-04-08 14:40:08 +02:00
mips MIPS: pic32: treat port as signed integer 2022-12-02 17:39:58 +01:00
nds32 nds32: fix access_ok() checks in get/put_user 2022-03-28 09:57:10 +02:00
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:38:04 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-09 10:20:55 +02:00
parisc parisc: Avoid printing the hardware path twice 2022-11-10 18:14:27 +01:00
powerpc powerpc: Fix SPE Power ISA properties for e500v1 platforms 2022-10-26 13:25:41 +02:00
riscv RISC-V: vdso: Do not add missing symbols to version section in linker script 2022-12-02 17:39:58 +01:00
s390 s390/crashdump: fix TOD programmable field size 2022-12-02 17:40:02 +01:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:25:17 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-05-30 09:33:42 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:25:10 +02:00
x86 perf/x86/intel/pt: Fix sampling using single range output 2022-11-25 17:45:54 +01:00
xtensa xtensa: iss: fix handling error cases in iss_net_configure() 2022-08-21 15:15:59 +02:00
.gitignore
Kconfig arch/cc: Introduce a function to check for confidential computing features 2021-11-18 14:04:32 +01:00