On Thu, 15 Dec 2011 11:28:03 +0100
Carsten Otte <[email protected]> wrote:

> +     case KVM_S390_KEYOP_SSKE:
> +             if (!(vma->vm_flags & (VM_WRITE | VM_MAYWRITE))) {
> +                     r = -EACCES;
> +                     break;
> +             }

Unfortunately I just realized while discussing with Heiko that a check
for VM_WRITE is not enough. We could still have a read-only pte that
points to a file backed page which is purely read-only. A write access
is allowed but would cause copy-on-write. But we set the storage key
of the original page which would make the read-only page dirty.
We need to solved the race on the dirty bit in a clean way, otherwise
there always will be a corner case.

-- 
blue skies,
   Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to