diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-11-05 17:33:20 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2019-11-20 12:58:12 +0100 |
commit | 13f9bae579c6bd051e58f326913dd09af1291208 (patch) | |
tree | b81d6d735ab09737047bb2884bbef36b2788a613 /arch/s390/include/asm | |
parent | 0398d4ab1677f7d8cd43aac2aa29a93dfcf9e2e3 (diff) | |
download | linux-13f9bae579c6bd051e58f326913dd09af1291208.tar.bz2 |
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>
Diffstat (limited to 'arch/s390/include/asm')
0 files changed, 0 insertions, 0 deletions