Re: [PATCH 07/10] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-17 Thread Marc Zyngier
On 17/10/17 15:46, Christoffer Dall wrote: > On Tue, Oct 17, 2017 at 12:22:08PM +0100, Marc Zyngier wrote: >> On 16/10/17 21:08, Christoffer Dall wrote: >>> On Mon, Oct 09, 2017 at 04:20:29PM +0100, Marc Zyngier wrote: So far, we loose the Exec property whenever we take permission faults,

Re: [PATCH 07/10] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-17 Thread Christoffer Dall
On Tue, Oct 17, 2017 at 12:22:08PM +0100, Marc Zyngier wrote: > On 16/10/17 21:08, Christoffer Dall wrote: > > On Mon, Oct 09, 2017 at 04:20:29PM +0100, Marc Zyngier wrote: > >> So far, we loose the Exec property whenever we take permission > >> faults, as we always reconstruct the PTE/PMD from scr

Re: [PATCH 07/10] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-17 Thread Marc Zyngier
On 16/10/17 21:08, Christoffer Dall wrote: > On Mon, Oct 09, 2017 at 04:20:29PM +0100, Marc Zyngier wrote: >> So far, we loose the Exec property whenever we take permission >> faults, as we always reconstruct the PTE/PMD from scratch. This >> can be counter productive as we can end-up with the foll

Re: [PATCH 07/10] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-16 Thread Christoffer Dall
On Mon, Oct 09, 2017 at 04:20:29PM +0100, Marc Zyngier wrote: > So far, we loose the Exec property whenever we take permission > faults, as we always reconstruct the PTE/PMD from scratch. This > can be counter productive as we can end-up with the following > fault sequence: > > X -> RO -> RO

[PATCH 07/10] KVM: arm/arm64: Preserve Exec permission across R/W permission faults

2017-10-09 Thread Marc Zyngier
So far, we loose the Exec property whenever we take permission faults, as we always reconstruct the PTE/PMD from scratch. This can be counter productive as we can end-up with the following fault sequence: X -> RO -> ROX -> RW -> RWX Instead, we can lookup the existing PTE/PMD and clear th