• Heiko Carstens's avatar
    s390/test_unwind: fix CALL_ON_STACK tests · f22b9c21
    Heiko Carstens authored
    The CALL_ON_STACK tests use the no_dat stack to switch to a different
    stack for unwinding tests. If an interrupt or machine check happens
    while using that stack, and previously being on the async stack, the
    interrupt / machine check entry code (SWITCH_ASYNC) will assume that
    the previous context did not use the async stack and happily use the
    async stack again.
    
    This will lead to stack corruption of the previous context.
    
    To solve this disable both interrupts and machine checks before
    switching to the no_dat stack.
    
    Fixes: 7868249f ("s390/test_unwind: add CALL_ON_STACK tests")
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    f22b9c21
test_unwind.c 8.17 KB