s390/pageattr: do a single TLB flush for change_page_attr
authorMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 4 Feb 2016 11:24:46 +0000 (12:24 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 23 Feb 2016 07:56:17 +0000 (08:56 +0100)
commit007ccec53da35528bd06fa0063da55b1311054c1
treea08ccb42cad189f7a4ca7bee843972a2227128bb
parent2cfc5f9ce7f5e17553e84d36ea9563e677e369d1
s390/pageattr: do a single TLB flush for change_page_attr

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: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/mm/pageattr.c
This page took 0.036205 seconds and 5 git commands to generate.