s390/mm: don't fault everything in read-write in gmap_pte_op_fixup()
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 13 Jun 2016 08:49:04 +0000 (10:49 +0200)
committerChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 20 Jun 2016 07:55:20 +0000 (09:55 +0200)
commit01f719176f28016da1b588f6560a4eef18a98a93
tree1ce75d8a85c078e46bd23733cf7fc098dc21b8dd
parent5b6c963bcef5c3a857e3f8ba84aa9380069fc95f
s390/mm: don't fault everything in read-write in gmap_pte_op_fixup()

Let's not fault in everything in read-write but limit it to read-only
where possible.

When restricting access rights, we already have the required protection
level in our hands. When reading from guest 2 storage (gmap_read_table),
it is obviously PROT_READ. When shadowing a pte, the required protection
level is given via the guest 2 provided pte.

Based on an initial patch by Martin Schwidefsky.

Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
arch/s390/mm/gmap.c