• Sven Schnelle's avatar
    s390/entry: add CIF_SIE flag and remove sie64a() address check · c239c83e
    Sven Schnelle authored
    When a program check, interrupt or machine check is triggered, the
    PSW address is compared to a certain range of the sie64a() function
    to figure out whether SIE was interrupted and a cleanup of SIE is
    needed.
    
    This doesn't work with kprobes: If kprobes probes an instruction, it
    copies the instruction to the kprobes instruction page and overwrites the
    original instruction with an undefind instruction (Opcode 00). When this
    instruction is hit later, kprobes single-steps the instruction on the
    kprobes_instruction page.
    
    However, if this instruction is a relative branch instruction it will now
    point to a different location in memory due to being moved to the kprobes
    instruction page. If the new branch target points into sie64a() the kernel
    assumes it interrupted SIE when processing the breakpoint and will crash
    trying to access the SIE control block.
    
    Instead of comparing the address, introduce a new CIF_SIE flag which
    indicates whether SIE was interrupted.
    Signed-off-by: default avatarSven Schnelle <svens@linux.ibm.com>
    Suggested-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Reviewed-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
    c239c83e
processor.h 10.3 KB