On 23/11/12 00:59, Christoffer Dall wrote: > From: Christoffer Dall <cdall@xxxxxxxxxxxxxxx> > > The set_pte_ext function orr'ed the RDONLY bit onto the PTEs, which is > bit[7], which is HAP[1] and causes writable access to the pages. > > This was unfortunate. > > Cc: Nicolas Viennot <nviennot@xxxxxxxxxxxxxxx> > Cc: Jeremy C. Andrus <jeremya@xxxxxxxxxxxxxxx> > Signed-off-by: Christoffer Dall <c.dall@xxxxxxxxxxxxxxxxxxxxxx> > --- > arch/arm/kvm/mmu.c | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --git a/arch/arm/kvm/mmu.c b/arch/arm/kvm/mmu.c > index 7b0e6e5..720bbd5 100644 > --- a/arch/arm/kvm/mmu.c > +++ b/arch/arm/kvm/mmu.c > @@ -41,6 +41,16 @@ static void kvm_tlb_flush_vmid(struct kvm *kvm) > kvm_call_hyp(__kvm_tlb_flush_vmid, kvm); > } > > +static void set_pte(pte_t *pte, pte_t new_pte) > +{ > + *pte = new_pte; One last nit: consider using "pte_val(*pte) = new_pte;" instead, so we can still compile with STRICT_MM_TYPECHECKS. M. -- Jazz is not dead. It just smells funny... _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm