• Martin Schwidefsky's avatar
    s390/pageattr: do a single TLB flush for change_page_attr · 007ccec5
    Martin Schwidefsky authored
    The change of the access rights for an address range in the kernel
    address space is currently done with a loop of IPTE + a store of the
    modified PTE. Between the IPTE and the store the PTE will be invalid,
    this intermediate state can cause problems with concurrent accesses.
    
    Consider a change of a kernel area from read-write to read-only, a
    concurrent reader of that area should be fine but with the invalid
    PTE it might get an unexpected exception.
    
    Remove the IPTEs for each PTE and do a global flush after all PTEs
    have been modified.
    Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    007ccec5
pageattr.c 3.32 KB