Changeset 180e132 in mainline


Ignore:
Timestamp:
2019-06-15T09:29:21Z (5 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4484c16
Parents:
2e311da
Message:

Use istate_from_uspace instead of is_kernel_fault

Userspace code can try to jump to a kernel address in which case some of
the TLB fault handlers would wrongly assume the fault happened in the
kernel and panic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/ia64/src/mm/tlb.c

    r2e311da r180e132  
    484484        pte_t t;
    485485
     486        assert(istate_from_uspace(istate));
     487
    486488        va = istate->cr_ifa; /* faulting address */
    487 
    488         assert(!is_kernel_fault(va));
    489489
    490490        bool found = page_mapping_find(AS, va, true, &t);
     
    680680        pte_t t;
    681681
     682        assert(istate_from_uspace(istate));
     683
    682684        va = istate->cr_ifa;  /* faulting address */
    683 
    684         assert(!is_kernel_fault(va));
    685685
    686686        bool found = page_mapping_find(AS, va, true, &t);
     
    752752        pte_t t;
    753753
     754        assert(istate_from_uspace(istate));
     755
    754756        va = istate->cr_ifa;  /* faulting address */
    755 
    756         assert(!is_kernel_fault(va));
    757757
    758758        /*
     
    779779        pte_t t;
    780780
     781        assert(istate_from_uspace(istate));
     782
    781783        va = istate->cr_ifa;  /* faulting address */
    782 
    783         assert(!is_kernel_fault(va));
    784784
    785785        bool found = page_mapping_find(AS, va, true, &t);
Note: See TracChangeset for help on using the changeset viewer.