• Mark Rutland's avatar
    arm64: treat unhandled compat el0 traps as undef · 381cc2b9
    Mark Rutland authored
    Currently, if a compat process reads or writes from/to a disabled
    cp15/cp14 register, the trap is not handled by the el0_sync_compat
    handler, and the kernel will head to bad_mode, where it will die(), and
    oops(). For 64 bit processes, disabled system register accesses are
    currently treated as unhandled instructions.
    
    This patch modifies entry.S to treat these unhandled traps as undefined
    instructions, sending a SIGILL to userspace. This gives processes a
    chance to handle this and stop using inaccessible registers, and
    prevents further issues in the kernel as a result of the die().
    Reported-by: default avatarJohannes Jensen <Johannes.Jensen@arm.com>
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
    381cc2b9
entry.S 15.2 KB