• Vasily Gorbik's avatar
    s390/kasan: make sure int handler always run with DAT on · 21a66717
    Vasily Gorbik authored
    Since commit 998f5bbe ("s390/kasan: fix early pgm check handler
    execution") early pgm check handler is executed with DAT on if Kasan
    is enabled.
    
    Still there is a window between setup_lowcore_dat_off() and
    setup_lowcore_dat_on() when int handlers could be executed with DAT off
    under Kasan. If this happens the kernel ends up in pgm check loop due
    to Kasan shadow memory access attempts.
    
    With Kasan enabled paging is initialized much earlier and DAT flag has to
    be on at all times instrumented code is executed. Make sure int handlers
    are set up to be called with DAT on right away in this case.
    Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
    21a66717
setup.c 31.3 KB