• Kirill A. Shutemov's avatar
    ARM: 5728/1: Proper prefetch abort handling on ARMv6 and ARMv7 · d25ef8b8
    Kirill A. Shutemov authored
    Currently, on ARMv6 and ARMv7, if an application tries to execute
    code (or garbage) on non-executable page it hangs. It caused by
    incorrect prefetch abort handling. Now every prefetch abort
    processes as a translation fault.
    
    To fix this we have to analyze instruction fault status register
    to figure out reason why we've got the abort and process it
    accordingly.
    
    To make IFSR different from DFSR we set bit 31 which is reserved in
    both IFSR and DFSR.
    
    This patch also tries to protect from future hangs on unexpected
    exceptions. An application will be killed if unexpected exception
    type was received.
    Signed-off-by: default avatarKirill A. Shutemov <kirill@shutemov.name>
    Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
    d25ef8b8
fault.c 14.9 KB