Re: [PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Andrew Scull
On Mon, Jun 22, 2020 at 11:39:32AM +0100, Andrew Scull wrote: > On Mon, Jun 22, 2020 at 10:15:08AM +0100, Mark Rutland wrote: > > On Mon, Jun 22, 2020 at 09:06:43AM +0100, Marc Zyngier wrote: > > > > > --- a/arch/arm64/include/asm/kvm_ptrauth.h > > > +++ b/arch/arm64/include/asm/kvm_ptrauth.h >

Re: [PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Andrew Scull
On Mon, Jun 22, 2020 at 10:15:08AM +0100, Mark Rutland wrote: > On Mon, Jun 22, 2020 at 09:06:43AM +0100, Marc Zyngier wrote: > > --- a/arch/arm64/include/asm/kvm_ptrauth.h > > +++ b/arch/arm64/include/asm/kvm_ptrauth.h > > @@ -61,44 +61,36 @@ > > > > /* > > * Both ptrauth_switch_to_guest

Re: [PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Mark Rutland
On Mon, Jun 22, 2020 at 11:25:41AM +0100, Marc Zyngier wrote: > On 2020-06-22 10:15, Mark Rutland wrote: > > On Mon, Jun 22, 2020 at 09:06:43AM +0100, Marc Zyngier wrote: > I have folded in the following patch: > > diff --git a/arch/arm64/include/asm/kvm_ptrauth.h >

Re: [PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Marc Zyngier
Hi Mark, On 2020-06-22 10:15, Mark Rutland wrote: On Mon, Jun 22, 2020 at 09:06:43AM +0100, Marc Zyngier wrote: We currently decide to execute the PtrAuth save/restore code based on a set of branches that evaluate as (ARM64_HAS_ADDRESS_AUTH_ARCH || ARM64_HAS_ADDRESS_AUTH_IMP_DEF). This can be

Re: [PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Mark Rutland
On Mon, Jun 22, 2020 at 09:06:43AM +0100, Marc Zyngier wrote: > We currently decide to execute the PtrAuth save/restore code based > on a set of branches that evaluate as (ARM64_HAS_ADDRESS_AUTH_ARCH || > ARM64_HAS_ADDRESS_AUTH_IMP_DEF). This can be easily replaced by > a much simpler test as the

[PATCH v2 5/5] KVM: arm64: Simplify PtrAuth alternative patching

2020-06-22 Thread Marc Zyngier
We currently decide to execute the PtrAuth save/restore code based on a set of branches that evaluate as (ARM64_HAS_ADDRESS_AUTH_ARCH || ARM64_HAS_ADDRESS_AUTH_IMP_DEF). This can be easily replaced by a much simpler test as the ARM64_HAS_ADDRESS_AUTH capability is exactly this expression.