linux/arch/s390
Vasily Gorbik 13f9bae579 s390/kasan: support memcpy_real with TRACE_IRQFLAGS
Currently if the kernel is built with CONFIG_TRACE_IRQFLAGS and KASAN
and used as crash kernel it crashes itself due to
trace_hardirqs_off/trace_hardirqs_on being called with DAT off. This
happens because trace_hardirqs_off/trace_hardirqs_on are instrumented and
kasan code tries to perform access to shadow memory to validate memory
accesses. Kasan shadow memory is populated with vmemmap, so all accesses
require DAT on.

memcpy_real could be called with DAT on or off (with kasan enabled DAT
is set even before early code is executed).

Make sure that trace_hardirqs_off/trace_hardirqs_on are called with DAT
on and only actual __memcpy_real is called with DAT off.

Also annotate __memcpy_real and _memcpy_real with __no_sanitize_address
to avoid further problems due to switching DAT off.

Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2019-11-20 12:58:12 +01:00
..
appldata proc/sysctl: add shared variables for range check 2019-07-18 17:08:07 -07:00
boot s390/boot: fix section name escaping 2019-10-31 17:20:52 +01:00
configs s390: update defconfigs 2019-10-04 16:37:33 +02:00
crypto s390/crypto: Fix unsigned variable compared with zero 2019-11-20 12:58:12 +01:00
hypfs Merge branch 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2019-09-24 12:33:34 -07:00
include s390: always inline current_stack_pointer() 2019-10-31 17:20:54 +01:00
kernel s390/disassembler: don't hide instruction addresses 2019-11-12 11:24:10 +01:00
kvm KVM: s390: mark __insn32_query() as __always_inline 2019-10-05 13:51:22 +02:00
lib s390/alternatives: make use of asm_inline 2019-10-31 17:20:51 +01:00
mm s390/kasan: support memcpy_real with TRACE_IRQFLAGS 2019-11-20 12:58:12 +01:00
net Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2019-09-06 16:49:17 +02:00
numa s390/numa: correct early_param handling 2019-08-26 12:51:17 +02:00
oprofile s390/unwind: introduce stack unwind API 2019-05-02 13:54:11 +02:00
pci s390/pci: mark function(s) __always_inline 2019-10-04 16:37:33 +02:00
purgatory crypto: sha256 - Merge crypto/sha256.h into crypto/sha.h 2019-09-05 14:54:54 +10:00
scripts s390/build: use size command to perform empty .bss check 2019-08-08 14:36:53 +02:00
tools s390: add support for IBM z15 machines 2019-09-13 12:19:14 +02:00
Kbuild
Kconfig s390/Kconfig: add z13s and z14 ZR1 to TUNE descriptions 2019-10-10 10:50:14 +02:00
Kconfig.debug
Makefile s390: add support for IBM z15 machines 2019-09-13 12:19:14 +02:00