linux/arch/s390/include/asm
Heiko Carstens e42ac7789d s390/checksum: always use cksm instruction
Commit dfe843dce7 ("s390/checksum: support GENERIC_CSUM, enable it for
KASAN") switched s390 to use the generic checksum functions, so that KASAN
instrumentation also works checksum functions by avoiding architecture
specific inline assemblies.

There is however the problem that the generic csum_partial() function
returns a 32 bit value with a 16 bit folded checksum, while the original
s390 variant does not fold to 16 bit. This in turn causes that the
ipib_checksum in lowcore contains different values depending on kernel
config options.

The ipib_checksum is used by system dumpers to verify if pointers in
lowcore point to valid data. Verification is done by comparing checksum
values. The system dumpers still use 32 bit checksum values which are not
folded, and therefore the checksum verification fails (incorrectly).

Symptom is that reboot after dump does not work anymore when a KASAN
instrumented kernel is dumped.

Fix this by not using the generic checksum implementation. Instead add an
explicit kasan_check_read() so that KASAN knows about the read access from
within the inline assembly.

Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Fixes: dfe843dce7 ("s390/checksum: support GENERIC_CSUM, enable it for KASAN")
Tested-by: Alexander Egorenkov <egorenar@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2023-04-13 17:36:25 +02:00
..
fpu s390/vx: use simple assignments to access __vector128 members 2023-02-09 20:11:23 +01:00
trace
vdso s390/vdso: use system call functions 2021-07-27 09:39:15 +02:00
abs_lowcore.h s390/mm: allocate Absolute Lowcore Area in decompressor 2023-01-13 14:15:06 +01:00
airq.h s390/airq: allow for airq structure that uses an input vector 2022-07-11 09:54:15 +02:00
alternative-asm.h s390/alternatives: remove padding generation code 2022-05-17 15:16:28 +02:00
alternative.h s390/alternatives: remove padding generation code 2022-05-17 15:16:28 +02:00
ap.h s390/ap: implement SE AP bind, unbind and associate 2023-03-20 11:12:49 +01:00
appldata.h
archrandom.h Random number generator updates for Linux 6.0-rc1. 2022-08-02 17:31:35 -07:00
asm-const.h
asm-extable.h s390/extable: add EX_TABLE_UA_LOAD_REGPAIR() macro 2022-11-21 13:36:15 +01:00
asm-prototypes.h
atomic_ops.h
atomic.h
barrier.h s390: add KCSAN instrumentation to barriers and spinlocks 2022-04-25 13:54:16 +02:00
bitops.h provide arch_test_bit_acquire for architectures that define test_bit 2022-08-27 09:49:54 -07:00
boot_data.h
bug.h bug: Use normal relative pointers in 'struct bug_entry' 2022-05-19 23:46:10 +02:00
cache.h
ccwdev.h s390/cio: introduce locking for register/unregister functions 2023-01-31 18:56:36 +01:00
ccwgroup.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
checksum.h s390/checksum: always use cksm instruction 2023-04-13 17:36:25 +02:00
chpid.h
chsc.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
cio.h s390/stp: clock_delta should be signed 2022-05-11 14:40:57 +02:00
clocksource.h
clp.h
cmb.h
cmpxchg.h s390/cmpxchg: make loop condition for 1,2 byte cases precise 2022-11-21 13:36:16 +01:00
compat.h RISC-V Patches for the 5.19 Merge Window, Part 1 2022-05-31 14:10:54 -07:00
cpacf.h s390/cpacf: get rid of register asm 2021-07-27 09:39:15 +02:00
cpcmd.h
cpu_mf-insn.h
cpu_mf.h s390/cpum_sf: move functions from header file to source file 2023-01-22 18:42:34 +01:00
cpu.h s390: add support for BEAR enhancement facility 2021-10-26 15:21:29 +02:00
cpufeature.h s390/uvdevice: autoload module based on CPU facility 2022-07-19 16:18:49 +02:00
cputime.h s390/idle: remove arch_cpu_idle_time() and corresponding code 2023-02-09 20:11:23 +01:00
crw.h s390: remove invalid email address of Heiko Carstens 2022-02-06 23:31:29 +01:00
css_chars.h
ctl_reg.h s390/pai: Add support for PAI Extension 1 NNPA counters 2022-09-16 18:36:25 +02:00
current.h
debug.h s390/debug: add _ASM_S390_ prefix to header guard 2023-01-06 16:38:21 +01:00
delay.h
diag.h s390/diag: use __packed __aligned 2023-01-09 14:34:05 +01:00
dis.h
dma.h PCI: Move isa_dma_bridge_buggy out of asm/dma.h 2022-07-22 17:24:47 -05:00
dwarf.h
eadm.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
ebcdic.h
elf.h s390/hwcaps: make sie capability regular hwcap 2021-07-27 09:39:21 +02:00
entry-common.h s390: move on_thread_stack() to processor.h 2023-04-04 18:34:56 +02:00
exec.h
extable.h s390/extable: convert to relative table with data 2022-03-08 00:33:00 +01:00
extmem.h
facility.h include/linux/delay.h: replace kernel.h with the necessary inclusions 2021-11-09 10:02:49 -08:00
fcx.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
ftrace.h ftrace: abstract DYNAMIC_FTRACE_WITH_ARGS accesses 2022-11-18 13:56:41 +00:00
ftrace.lds.h s390/ftrace: implement hotpatching 2021-08-03 14:31:40 +02:00
futex.h s390/futex: add missing EX_TABLE entry to __futex_atomic_op() 2022-10-26 14:47:31 +02:00
gmap.h KVM: s390: pv: refactor s390_reset_acc 2022-07-13 14:42:11 +00:00
hardirq.h
hugetlb.h s390/hugetlb: fix prepare_hugepage_range() check for 2 GB hugepages 2022-08-30 21:57:07 +02:00
hw_irq.h
idals.h vfio/ccw: calculate number of IDAWs regardless of format 2023-01-09 14:34:08 +01:00
idle.h s390/irq,idle: simplify idle check 2023-02-15 11:07:01 +01:00
io.h
ipl.h s390/ipl: add eckd dump support 2022-12-06 16:18:22 +01:00
irq_work.h
irq.h s390/irq: use assignment instead of cast 2022-03-08 00:33:01 +01:00
irqflags.h
isc.h
itcw.h
jump_label.h jump_label: s390: avoid pointless initial NOP patching 2022-06-24 09:48:54 +02:00
kasan.h s390/kasan: move shadow mapping to decompressor 2023-03-20 11:02:51 +01:00
Kbuild
kdebug.h exit: Remove calls of do_exit after noreturn versions of die 2021-10-20 13:09:47 -05:00
kexec.h kexec: drop weak attribute from functions 2022-07-15 12:21:16 -04:00
kfence.h s390: add support for KFENCE 2021-07-30 17:09:02 +02:00
kprobes.h s390/rethook: add local rethook header file 2023-02-06 11:13:53 +01:00
kvm_host.h KVM: Opt out of generic hardware enabling on s390 and PPC 2022-12-29 15:48:37 -05:00
kvm_para.h KVM: s390: generate kvm hypercall functions 2021-08-25 11:03:35 +02:00
linkage.h s390: make use of CONFIG_FUNCTION_ALIGNMENT 2023-03-20 11:12:46 +01:00
lowcore.h s390/pai: Add support for PAI Extension 1 NNPA counters 2022-09-16 18:36:25 +02:00
maccess.h s390/mm: allocate Real Memory Copy Area in decompressor 2023-01-13 14:15:06 +01:00
mem_encrypt.h s390/mm: fix virtual-physical address confusion for swiotlb 2022-11-07 14:33:40 +01:00
mmu_context.h KVM: s390: pv: usage counter instead of flag 2022-07-13 14:42:11 +00:00
mmu.h s390 updates for 5.20 merge window 2022-08-06 17:05:21 -07:00
mmzone.h
module.h s390/ftrace: implement hotpatching 2021-08-03 14:31:40 +02:00
msi.h irq/s390: Add arch_is_isolated_msi() for s390 2023-01-11 16:27:23 -04:00
nmi.h s390/mcck: cleanup user process termination path 2023-02-28 13:19:05 +01:00
nospec-branch.h s390: introduce nospec_uses_trampoline() 2021-10-26 15:21:29 +02:00
nospec-insn.h s390/expoline: use __ALIGN instead of open coded .align 2023-03-20 11:12:47 +01:00
numa.h
os_info.h s390/mm: uninline copy_oldmem_kernel() function 2022-09-14 16:46:01 +02:00
page-states.h
page.h mm: add vma_alloc_zeroed_movable_folio() 2023-02-02 22:33:18 -08:00
pai.h s390/pai: move enum definition to header file 2022-10-26 14:46:51 +02:00
pci_clp.h s390/pci: stash dtsm and maxstbl 2022-07-11 09:54:24 +02:00
pci_debug.h s390/pci: add error record for CC 2 retries 2022-04-25 13:54:15 +02:00
pci_dma.h iommu/s390: Push the gfp parameter to the kmem_cache_alloc()'s 2023-01-25 11:52:06 +01:00
pci_insn.h KVM: s390: pci: do initial setup for AEN interpretation 2022-07-11 09:54:28 +02:00
pci_io.h s390/pci: move pseudo-MMIO to prevent MIO overlap 2021-11-29 09:48:34 +01:00
pci.h s390/pci: use lock-free I/O translation updates 2022-11-19 10:28:18 +01:00
percpu.h s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple() 2023-01-11 15:28:47 +01:00
perf_event.h s390/cpum_sf: remove flag PERF_CPUM_SF_FULL_BLOCKS 2023-03-27 17:19:52 +02:00
pgalloc.h s390/mm: use set_pXd()/set_pte() helper functions everywhere 2022-03-01 21:05:10 +01:00
pgtable.h - Daniel Verkamp has contributed a memfd series ("mm/memfd: add 2023-02-23 17:09:35 -08:00
physmem_info.h s390/kasan: move shadow mapping to decompressor 2023-03-20 11:02:51 +01:00
pkey.h
pnet.h
preempt.h s390/preempt: disable __preempt_count_add() optimization for PROFILE_ALL_BRANCHES 2022-05-11 14:40:58 +02:00
processor.h s390: move on_thread_stack() to processor.h 2023-04-04 18:34:56 +02:00
ptdump.h
ptrace.h s390/mm: start kernel with DAT enabled 2023-01-13 14:15:05 +01:00
purgatory.h
qdio.h s390/qdio: Fix spelling mistake 2022-06-30 19:40:36 +02:00
runtime_instr.h
rwonce.h s390/rwonce: add READ_ONCE_ALIGNED_128() macro 2023-02-28 13:19:05 +01:00
schid.h
sclp.h s390/sclp: introduce sclp_emergency_printk() 2022-12-06 16:18:24 +01:00
scsw.h s390/dasd: suppress generic error messages for PPRC secondary devices 2022-09-21 08:32:51 -06:00
seccomp.h
sections.h s390: use generic version of arch_is_kernel_initmem_freed() 2021-11-06 13:30:38 -07:00
set_memory.h s390/mm: implement set_memory_4k() 2021-07-30 17:09:01 +02:00
setup.h Merge branch 'decompressor-memory-tracking' into features 2023-03-20 11:04:10 +01:00
signal.h
sigp.h
smp.h s390/dump: save IPL CPU registers once DAT is available 2022-09-14 16:46:00 +02:00
softirq_stack.h asm-generic: Conditionally enable do_softirq_own_stack() via Kconfig. 2022-09-05 17:20:55 +02:00
sparsemem.h
spinlock_types.h locking: Allow to include asm/spinlock_types.h from linux/spinlock_types_raw.h 2021-12-07 15:14:12 +01:00
spinlock.h s390/alternatives: provide identical sized orginal/alternative sequences 2022-05-17 15:16:28 +02:00
stacktrace.h s390/stacktrace: remove call_on_stack_noreturn() 2023-04-04 18:34:56 +02:00
stp.h s390/stp: fix todoff size 2022-05-11 14:40:57 +02:00
string.h s390/string: use generic strlcpy 2021-10-26 15:21:30 +02:00
switch_to.h
syscall_wrapper.h s390/syscalls: get rid of system call alias functions 2023-01-25 20:51:11 +01:00
syscall.h arch: remove unused function syscall_set_arguments() 2021-09-14 16:06:20 +02:00
sysinfo.h treewide: Replace zero-length arrays with flexible-array members 2022-02-17 07:00:39 -06:00
text-patching.h s390: introduce text_poke_sync() 2021-10-11 20:55:58 +02:00
thread_info.h s390/stack: use STACK_INIT_OFFSET where possible 2023-04-04 18:34:55 +02:00
timex.h s390: define get_cycles macro for arch-override 2022-05-13 23:59:23 +02:00
tlb.h mm: delay page_remove_rmap() until after the TLB has been flushed 2022-11-30 15:58:50 -08:00
tlbflush.h s390: convert ".insn" encoding to instruction names 2022-03-10 15:58:17 +01:00
topology.h
tpi.h KVM: s390: pci: enable host forwarding of Adapter Event Notifications 2022-07-11 09:54:29 +02:00
types.h
uaccess.h s390/uaccess: avoid __ashlti3() call 2023-01-04 17:54:50 +01:00
unistd.h fs: stat: compat: Add __ARCH_WANT_COMPAT_STAT 2022-04-26 13:35:45 -07:00
unwind.h s390/kprobes: replace kretprobe with rethook 2023-01-22 18:42:35 +01:00
uprobes.h
user.h asm/user.h: killed unused macros 2022-01-30 21:17:00 -05:00
uv.h KVM: s390: pv: support for Destroy fast UVC 2022-11-23 09:06:50 +00:00
vdso.h s390/vdso: add minimal compat vdso 2021-07-08 15:37:28 +02:00
vmalloc.h
vmlinux.lds.h
vtime.h
vtimer.h
vx-insn-asm.h s390/vx: add vx-insn.h wrapper include file 2022-12-06 16:18:23 +01:00
vx-insn.h s390/vx: add vx-insn.h wrapper include file 2022-12-06 16:18:23 +01:00
xor.h